Symptoms

readCSPAccounts.py script throws the following error:

Error: 'ascii' codec can't encode character u'\u2013' in position 7: ordinal not in range(128)

Cause

Python-specific error in case script input string (CSP account information like subdomain or login) can not be converted according to the encoding rules. Please, refer to the Python UNICODE howto article to obtain more detailed information.

Resolution

Insert the following code block to the script readCSPAccounts.py

import sys
...
reload(sys)
sys.setdefaultencoding('utf-8')

Then re-run the script.

Internal content

Link on internal Article