Pycharm - SyntaxError: Non-UTF-8 code starting with '\x80'
Solution 1
What you have entered as Script: looks like a Python interpreter. You should put test.py
there. Script parameters: are the additional parameters passed to the script on the command line, not the Python script to run.
Solution 2
Be cognizant of that you have right script path. Your file name must be same in the path.
tushar patil
Updated on July 25, 2022Comments
-
tushar patil over 1 year
I am trying to open project in PyCharm which includes simple
virtual environment(python 3) and test.py
after opening it in PyCharm I've configured python interpreter to virtual environments Python 3.
then after running it in PyCharm I get the following error:
SyntaxError: Non-UTF-8 code starting with '\x80' in file /home/ubuntu/Downloads/PythonDemo/PythonDemo/venv_3/bin/python3 on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
How to resolve this issue?