Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

UnicodeEncodeError: 'latin-1'

Hello all!

I am new and i tried my first plot. But when i trying do anything i got error like that:

File “D:\ANACONDA\lib\site-packages\plotly\api\utils.py”, line 37, in basic_auth
password = password.encode(‘latin1’)

UnicodeEncodeError: ‘latin-1’ codec can’t encode characters in position 0-9: ordinal not in range(256)

I am newbie so please answer me as clearly as it is possible
Thx for help everyone.

ps. I use Anaconda in Windows8.1

@BezBartek Don’t use letters with accents or special characters like this one ł (for example) in your password. You may choose a password
containing only english letters from a to z, and the digits 0,1,2, …9.

Thx, but i dont use them in my password. i used only english characters and digits as you say.

maybe i doing something wrong with the API key, in the instructions API key contains characters and digits, but when i generate API key on my profile, i have it hidden. maybe when i coppy them, python dont recognize what is behind. Is it possible? If is true, how deal with it?

Ok it was API, i solved it now thx for help.

@BezBartek In this case you should regenerate the API key, copy and save it in a text file such that to be able to use the expliclit one for each plot. In Settings-> API keys there is a button, Regenerate key. Click it and copy the new generated key.

1 Like