K
K
karkir722019-05-25 21:21:10
Python
karkir72, 2019-05-25 21:21:10

Atom runner how to fix encoding error?

The following function in Windows 10 gives an error (Cyrillic is used on the site where the request is sent)

def get_html(url):
    r = requests.get(url)
    return r.text

Error text
UnicodeEncodeError: 'charmap' codec can't encode character '\u20bd' in position 13283: character maps to

Through the console everything is displayed correctly. How to fix the error by staying on windows?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question