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

Getting UnicodeDecodeError at /api/people/66/ #30

Open
mdhorda opened this issue Oct 25, 2015 · 0 comments
Open

Getting UnicodeDecodeError at /api/people/66/ #30

mdhorda opened this issue Oct 25, 2015 · 0 comments

Comments

@mdhorda
Copy link

mdhorda commented Oct 25, 2015

Requesting http://swapi.co/api/people/66/?format=wookiee causes a UnicodeDecodeError. This works fine when not requesting the wookiee format. Looks like it's caused by an accented character in some of the character names like Dormé. The error occurs here:

/Users/mdhora/Github/swapi/resources/renderers.py in render
return bytes(self.translate_to_wookie(encoded_data)) ...

/Users/mdhora/Github/swapi/resources/renderers.py in translate_to_wookie
translated_data += char

mdhorda pushed a commit to mdhorda/swapi that referenced this issue Oct 25, 2015
Decoded byte string before iterating over it and added a mapping for
accented e character in lookup table.

Fixes phalt#30
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

No branches or pull requests

1 participant