Pycharm - SyntaxError: Non-UTF-8 code starting with '\x80'

Viewed 11631

enter image description here

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?

2 Answers

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.

Be cognizant of that you have right script path. Your file name must be same in the path.

enter image description here

Related