Issue #144 resolved

Failure generating HTML output for devinabox

Anonymous created an issue

Trying to create an up-to-date version of devinabox before PyconAU this weekend, I'm getting the following error in the HTML report generation stage:

<snip multitude of warnings the same as the three below> Coverage.py warning: Trace function changed, measurement is likely wrong: None Coverage.py warning: Trace function changed, measurement is likely wrong: None Coverage.py warning: Trace function changed, measurement is likely wrong: None [2415903 refs] Generating report ... Traceback (most recent call last): File "/home/ncoghlan/devel/devinabox/cpython/Lib/runpy.py", line 160, in _run_module_as_main "main", fname, loader, pkg_name) File "/home/ncoghlan/devel/devinabox/cpython/Lib/runpy.py", line 73, in _run_code exec(code, run_globals) File "/home/ncoghlan/devel/devinabox/coveragepy/main.py", line 8, in <module> run_globals = runpy.run_module(PKG, run_name='main', alter_sys=True) File "/home/ncoghlan/devel/devinabox/cpython/Lib/runpy.py", line 174, in run_module fname, loader, pkg_name) File "/home/ncoghlan/devel/devinabox/cpython/Lib/runpy.py", line 83, in _run_module_code mod_name, mod_fname, mod_loader, pkg_name) File "/home/ncoghlan/devel/devinabox/cpython/Lib/runpy.py", line 73, in _run_code exec(code, run_globals) File "/home/ncoghlan/devel/devinabox/coveragepy/coverage/main.py", line 3, in <module> main() File "coveragepy/coverage/cmdline.py", line 657, in main status = CoverageScript().command_line(argv) File "coveragepy/coverage/cmdline.py", line 549, in command_line directory=options.directory, **report_args) File "coveragepy/coverage/control.py", line 592, in html_report reporter.report(morfs, config=self.config) File "coveragepy/coverage/html.py", line 83, in report self.report_files(self.html_file, morfs, config, config.html_dir) File "coveragepy/coverage/report.py", line 86, in report_files report_fn(cu, self.coverage._analyze(cu)) File "coveragepy/coverage/html.py", line 195, in html_file fhtml.write(html) UnicodeEncodeError: 'utf-8' codec can't encode character '\udb40' in position 6751: surrogates not allowed

Comments (4)

  1. Nick Coghlan

    And again with the traceback properly formatted...

    <snip multitude of warnings the same as the three below>
    Coverage.py warning: Trace function changed, measurement is likely wrong: None
    Coverage.py warning: Trace function changed, measurement is likely wrong: None
    Coverage.py warning: Trace function changed, measurement is likely wrong: None
    [2415903 refs]
    Generating report ...
    Traceback (most recent call last):
     File "/home/ncoghlan/devel/devinabox/cpython/Lib/runpy.py", line
    160, in _run_module_as_main
       "__main__", fname, loader, pkg_name)
     File "/home/ncoghlan/devel/devinabox/cpython/Lib/runpy.py", line 73,
    in _run_code
       exec(code, run_globals)
     File "/home/ncoghlan/devel/devinabox/coveragepy/__main__.py", line
    8, in <module>
       run_globals = runpy.run_module(PKG, run_name='__main__', alter_sys=True)
     File "/home/ncoghlan/devel/devinabox/cpython/Lib/runpy.py", line
    174, in run_module
       fname, loader, pkg_name)
     File "/home/ncoghlan/devel/devinabox/cpython/Lib/runpy.py", line 83,
    in _run_module_code
       mod_name, mod_fname, mod_loader, pkg_name)
     File "/home/ncoghlan/devel/devinabox/cpython/Lib/runpy.py", line 73,
    in _run_code
       exec(code, run_globals)
     File "/home/ncoghlan/devel/devinabox/coveragepy/coverage/__main__.py",
    line 3, in <module>
       main()
     File "coveragepy/coverage/cmdline.py", line 657, in main
       status = CoverageScript().command_line(argv)
     File "coveragepy/coverage/cmdline.py", line 549, in command_line
       directory=options.directory, **report_args)
     File "coveragepy/coverage/control.py", line 592, in html_report
       reporter.report(morfs, config=self.config)
     File "coveragepy/coverage/html.py", line 83, in report
       self.report_files(self.html_file, morfs, config, config.html_dir)
     File "coveragepy/coverage/report.py", line 86, in report_files
       report_fn(cu, self.coverage._analyze(cu))
     File "coveragepy/coverage/html.py", line 195, in html_file
       fhtml.write(html)
    UnicodeEncodeError: 'utf-8' codec can't encode character '\udb40' in
    position 6751: surrogates not allowed
    
  2. Log in to comment