Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure generating HTML output for devinabox #144

Closed
nedbat opened this issue Aug 17, 2011 · 3 comments
Closed

Failure generating HTML output for devinabox #144

nedbat opened this issue Aug 17, 2011 · 3 comments
Labels
bug Something isn't working html

Comments

@nedbat
Copy link
Owner

nedbat commented Aug 17, 2011

Originally reported by Anonymous


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:

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 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 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
@nedbat
Copy link
Owner Author

nedbat commented Aug 17, 2011

Original comment by Nick Coghlan (Bitbucket: ncoghlan, GitHub: ncoghlan)


Oops, forgot to log in first - report is from me.

@nedbat
Copy link
Owner Author

nedbat commented Aug 17, 2011

Original comment by Nick Coghlan (Bitbucket: ncoghlan, GitHub: ncoghlan)


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

@nedbat
Copy link
Owner Author

nedbat commented Aug 17, 2011

Fixed in <<changeset 8ed27b5e5e82 (bb)>>, though the HTML generated doesn't display the surrogate pair well.

@nedbat nedbat closed this as completed Aug 17, 2011
@nedbat nedbat added major bug Something isn't working html labels Jun 23, 2018
agronholm pushed a commit to agronholm/coveragepy that referenced this issue Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working html
Projects
None yet
Development

No branches or pull requests

1 participant