-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows10 - UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte #1663
Comments
|
I see that you are using a different encoding that the usual one, can you get the output of |
Looks like it's an exception from reading pylintrc file. Do you have matching file somewhere in your env? |
In PowerShell session on Windows 10 command |
For now I'll close it as not a bug - since we do not support non-standard encodings in rcfile right now. I'm not sure whether pylint eventually is supposed to support non-ascii / non-utf8 rc files. To be determined... |
run chcp 65001 |
chcp 65001 && pip install pylint && chcp 866 && pip install pylint |
I encountered this bug when generating the .pylintrc file as described by @sldsrg (done in Windows 10, in the VS Code Powershell terminal). The chcp 65001 solution did not work for me. I was able to fix it by opening my .pylintrc file in Notepad++, choosing the UTF-8 encoding there, and then saving the file. After that, the .pylintrc file remains in the proper format while editing and saving in VS Code. |
You can specify the encoding in PowerShell with
|
重新產生一次並加上 utf-8 的參數免得它存成 big5 或其它編碼 pylint --generate-rcfile | Out-File -Encoding utf8 .pylintrc 參考 pylint-dev/pylint#1663 並且修正一些 __init__.py 的警告
very useful, thanks |
Steps to reproduce
Microsoft Windows 10 Pro,1703,64-bit
pip install pylint
There is no other python on the system. have tried reinstalling.
Current behavior
it is the same in powershell, any other python program works fine
Could it be some python2/python3 and utf-8 missmatch?
Expected behavior
Works fine in windows bash (ubuntu 16.04):
pylint --version output
λ pip freeze | findstr "pylint"
pylint==1.7.2
The text was updated successfully, but these errors were encountered: