UnicodeEncodeError: ‘ascii’ codec can’t encode character at special name [duplicate]

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 .

Leave a Comment