Answer the question
In order to leave comments, you need to log in
Non-UTF-8 error in PyCharm, what to do about it?
When I run the code, I get the error Non-UTF-8 code starting with '\xd0', what should I do about it? Explain, please, in more detail, because. I'm quite new and don't understand what coding is, all these types etc. (photo of error and code below)
Answer the question
In order to leave comments, you need to log in
Your source code is not typed in UTF-8 encoding, or Python did not understand what it is typed in.
a) See what encoding is selected in the Pycharm settings.
b) Add a line to the beginning of the file indicating the encoding, for example
# -*- coding: utf-8 -*-
if the file is still in utf-8 or
# -*- coding: windows-1251 -*-
if the file is typed in Windows default encoding.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question