A UnicodeEncodeError exception will be raised if a unicode object is converted to a string, but the default encoding (or the explicit encoding used) does not support a character that is present in the unicode object. For example:
>>> title=u"Hello \u00E1"
>>>
>>> str(title)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 6: ordinal not in range(128)
>>> print title.encode("latin1")
Hello รก
>>>