Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.9.4
-
Component/s: Media Monitor
-
Labels:None
-
Originating Party:Clients & Services Dept, User
Description
As reported here: http://forum.sourcefabric.org/index.php?t=rview&goto=12824#msg_12824
Successfully recreated problem. urlencode seems to be the problem function:
>>> urllib.urlencode({"name":u"ESPAÑO"})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/urllib.py", line 1282, in urlencode
v = quote_plus(str(v))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0303' in position 5: ordinal not in range(128)
Seen in this example, it does not like taking a dictionary with unicode characters. The unicode needs to be encoded to utf-8 first.
Successfully recreated problem. urlencode seems to be the problem function:
>>> urllib.urlencode({"name":u"ESPAÑO"})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/urllib.py", line 1282, in urlencode
v = quote_plus(str(v))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0303' in position 5: ordinal not in range(128)
Seen in this example, it does not like taking a dictionary with unicode characters. The unicode needs to be encoded to utf-8 first.