Search code examples
pythonpylint

Pylint invalid syntax (<string>, line ...) (syntax-error) Because of accent character


When I run Pylint without accentuated characters, it runs fine. When I have a class name like Café, I get the syntax error. I'm on a Mac. Tried to find how to configure that without success.


Solution

  • I was running pylint but underneath it was using python 2.7 which as @jasonharper said is ASCII only.

    I installed pylint with : python -m pip install -U pylint

    Note that I have an alias that makes my python commands run as python3.

    Now it works