AttributeError: 'list' object has no attribute 'encode'

The Solution to AttributeError: 'list' object has no attribute 'encode' is


You need to do encode on tmp[0], not on tmp.

tmp is not a string. It contains a (Unicode) string.

Try running type(tmp) and print dir(tmp) to see it for yourself.

~ Answered on 2011-02-20 00:05:52


Most Viewed Questions: