Closed rehanog closed 11 years ago
The error occurs because adding in
to the search finds another result, which has Piñata
in the name:
>>> sr = tmdb.search("in bruges")
s>>> sr[0]
<MovieResult: In Bruges (2008-02-08)>
>>> sr[1]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 32: ordinal not in range(128)
>>> "%s" % sr[1]['name']
u'Curious George: Pi\xf1ata Vision and other stories'
Not exactly sure why it's breaking the repr of the Movie, but should be easily fixed, and it should be fine if you are actually using the movie objects "properly", not in the Python shell - e.g printing the name is fine:
>>> print "%s" % sr[1]['name']
Curious George: Piñata Vision and other stories
Should be fixed!
Hi,
Thanks for a really useful program.
Got a strange bug:
For some reason any string starting "in b" causes the issue. Can't replicate the bug with any other string.
Any thoughts?
sincerely,
Rehan