openphoto/openphoto-python — Issue #7: Properly handle Unicode characters in post params
Author: jmathai
Created: 2012-02-03 23:52:37+00:00
State: open

From: https://gist.github.com/1732810

Processing 906 of 3975 2768847584.json ...
Traceback (most recent call last):
File "import.py", line 66, in
main()
File "import.py", line 44, in main
resp = client.post('/photo/upload.json', params)
File "/Library/Python/2.7/site-packages/openphoto-0.1-py2.7.egg/openphoto/__init__.py", line 41, in post
body = urllib.urlencode(params)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 1294, in urlencode
v = quote_plus(str(v))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe7' in position 77: ordinal not in range(128)