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

10,375

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.

enter image description here

Share:
10,375
tushar patil
Author by

tushar patil

Updated on July 25, 2022

Comments

  • tushar patil
    tushar patil over 1 year

    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?