0

I tried to install pylint with the pylint plugin in PyCharm.

I created a blank project in a venv.

I am using:

pylint 2.14.0
astroid 2.11.5
Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
PyCharm 2022.1.2

I tried:

  • specifying the path of the exe explicitly in the plugin-setting (C:\git\pythonProject\venv\Scripts\pylint.exe)
  • different Python version (3.9.6)
  • different pylint version
  • new venv
  • reinstall pylint plugin
  • Re-installing PyCharm
  • Restart PC

I get the following Error, when i try to run -help in the console

> (venv) PS C:\git\pythonProject1> pylint -help

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

screenshot

Has anyone a clue? Thank you in advance

  • Hi, please take a look at these questions: https://stackoverflow.com/questions/42339876/error-unicodedecodeerror-utf-8-codec-cant-decode-byte-0xff-in-position-0-in https://stackoverflow.com/questions/22216076/unicodedecodeerror-utf8-codec-cant-decode-byte-0xa5-in-position-0-invalid-s – Reza Akraminejad Jun 02 '22 at 11:22
  • @Hamed_gibago Thanks I already looked at those. However I dont want to change the encoding, since UTF-8 is the standard. – Cyrill Mast Jun 02 '22 at 11:55
  • Do you have any of the files listed in the link below that pylint treats as possible configuration files which is not UTF-8 encoded? https://pylint.pycqa.org/en/latest/user_guide/usage/run.html?highlight=pylintrc#command-line-options – dudenr33 Jun 04 '22 at 11:39
  • if I don't have the rcfile, and I enter pylint -help in the terminal, I get this error. – Cyrill Mast Jun 08 '22 at 06:10

1 Answers1

0

need to use

pip install pylint

then generate a pylintrc file like:

pylint --generate-rcfile > ~/.pylintrc

and move it into your projects folder

then find the path to pylint for example:

venv/bin/pylint

then go to preferences -> pylint in PyCharm and set the pylint executable to be that path and click test

Note i have found the SonarLint plugin easier to work with. I wasn't seeing a way to navigate from the lint error to the setting to turn off the link but i saw that with SonarLint

user1689987
  • 1,002
  • 1
  • 8
  • 23