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

avoid double-decoding unicode when python behaves like python 3 #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iandennismiller
Copy link

I started getting the following error:

File "/Users/idm/.virtualenvs/greenthink/lib/python2.7/site-packages/poodledo-0.2-py2.7.egg/poodledo/toodledodata.py", line 144, in __init__
    self.__dict__[elem.tag] = typemap[elem.tag](elem.text)
File "build/bdist.macosx-10.9-intel/egg/six.py", line 468, in u
    return unicode(s, "unicode_escape")
TypeError: decoding Unicode is not supported

I think this began when I updated to OS X Mavericks, possibly related to the jump to Python 2.7. I don't know. At any rate, I think I fixed the issue by adapting a bugfix from django:

django-extensions/django-extensions@5d33029

I'm sending along a pull request with the code that worked for me. I did not test this on python 2.6 or 3.x, but I am banking on the django patch being correct for those versions.

I was hoping you could incorporate this and propagate to pypi, assuming the patch works for you too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant