Comments
-
Try setting the system default encoding as utf-8 at the start of the script, so that all strings are encoded using that. Example - import sys reload(sys) sys.setdefaultencoding('utf-8') The above should set the default encoding as utf-8 . In most cases, the issue is that when you call str(), python uses the default…