Pylint UnicodeDecodeError utf-8 can't decode byte
Asked Answered
F

1

8

When I run pylint installed with pip (version 2.1.1 and Python V.3.7) in windows 10, I get this error:

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

How do we fix it?

Here is the screenshot Pylint error

Fca answered 20/9, 2018 at 5:58 Comment(6)
Please add python version information, pylint version information, the file content which you are trying to validate.Support
@arsho I edited with version information. When I just run pylint in cmd it gives this errorFca
Can you add the python file you are trying to use with pylint? Does the program run successfully?Support
I am not checking any python file. Just to check if pylint is installed properly, I am running just pylint in terminal.Fca
I installed pylint inside virtual environment and could use it. Take a look at this gist.github.com/arsho/98acacd6c83320e227aa9bd9fed99b35 . You may try to install pylint in virtual environment without using the existing site-packages like this procedure.Support
Yes I have tried it and still I get the same errorFca
H
31

If you haven't already, generate a pylintrc file like this:

pylint --generate-rcfile | out-file -encoding utf8 .pylintrc

It's important to include the encoding option.

Heimlich answered 30/10, 2018 at 14:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.