[Python] Python - How do I fix "SyntaxError: Non-ASCII character '\xd1'" in charset_normalizer...

Discussão em 'Python' iniciado por Stack, Fevereiro 5, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to run a python script that has a dependency on charset_normalizer. When I execute the script with the command:

    python myscript.py

    I get the following error: SyntaxError: Non-ASCII character '\xd1' in file /usr/local/lib/python3.9/dist-packages/charset_normalizer/__init__.py on line 12, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

    I am using Python3.9 on Debian, and I have the PYTHONUTF8 environment variable set to 1

    Continue reading...

Compartilhe esta Página