-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
UnicodeDecodeError on html.py #193
Comments
Could you send or attach a data file that has this problem? Also, can you explain more about how Python 2 and Python 3 are mixing in your environment? |
Original comment by Peter Portante (Bitbucket: portante, GitHub: portante) Hi Ned, I seem to be encountering the same problem from pycscope. I am using Fedora 16, where by default /usr/bin/python is a link to python2. I run the runtests script which just invokes nosetests like: nosetests --with-coverage --cover-package pycscope -cover-erase --cover-html $@ When I then switch the default python by relinking /usr/bin/python to python3 I get the decode error. If I remove the "cover" directory then python 3 coverage works. For now I have specified a separate directory for my python2 and python2 coverage runs. |
Fixed in <<changeset 16020b834643 (bb)>>, but the old status is discarded and the coverage report recreated from scratch. |
Original comment by Simon Coulton (Bitbucket: simoncoulton, GitHub: simoncoulton) Hi Ned, Thanks for the fix :) |
Originally reported by Simon Coulton (Bitbucket: simoncoulton, GitHub: simoncoulton)
Using Python 3.2.3, the app occasionally fails to build the HTML required, and errors on line 277: status = pickle.load(fstatus). This could just be that the original status.dat file had some Python 2 code in it, in any case the following resolves the issue:
try:
if sys.version_info < (3, 0):
status = pickle.load(fstatus)
else:
u = pickle._Unpickler(fstatus)
u.encoding = 'latin1'
status = u.load()
The text was updated successfully, but these errors were encountered: