You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following error, when running pylint from spyder (on a single file):
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/dist-packages/pylint/__main__.py", line 18, in<module>pylint.run_pylint()
File "/usr/local/lib/python3.6/dist-packages/pylint/__init__.py", line 19, in run_pylint
from pylint.lint import Run as PylintRun
File "/usr/local/lib/python3.6/dist-packages/pylint/lint/__init__.py", line 76, in<module>
from pylint.lint.pylinter import PyLinter
File "/usr/local/lib/python3.6/dist-packages/pylint/lint/pylinter.py", line 19, in<module>
from pylint import checkers, config, exceptions, interfaces, reporters
File "/usr/local/lib/python3.6/dist-packages/pylint/checkers/__init__.py", line 45, in<module>
from pylint.checkers.base_checker import BaseChecker, BaseTokenChecker
File "/usr/local/lib/python3.6/dist-packages/pylint/checkers/base_checker.py", line 20, in<module>
from pylint.config import OptionsProviderMixIn
File "/usr/local/lib/python3.6/dist-packages/pylint/config/__init__.py", line 103, in<module>
PYLINTRC = find_pylintrc()
File "/usr/local/lib/python3.6/dist-packages/pylint/config/__init__.py", line 96, in find_pylintrc
forconfig_fileinfind_default_config_files():
File "/usr/local/lib/python3.6/dist-packages/pylint/config/find_default_config_files.py", line 35, in find_default_config_files
if config_name.endswith(".cfg") and not _cfg_has_config(config_name):
File "/usr/local/lib/python3.6/dist-packages/pylint/config/find_default_config_files.py", line 23, in _cfg_has_config
parser.read(path)
File "/usr/lib/python3.6/configparser.py", line 697, inread
self._read(fp, filename)
File "/usr/lib/python3.6/configparser.py", line 1015, in _read
forlineno, linein enumerate(fp, start=1):
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 227: ordinal not in range(128)
makes it at least working. I don't know the rational behind this or how to force pylint to read setup.cfg encoded as utf-8. Putting # -*- coding: utf-8 -*- on top of the file didn't help. Or should I prevent umlauts in setup.cfg?!
Am I missing something?
Cheers,
Sebastian
The text was updated successfully, but these errors were encountered:
Thank you for the report, yes the encoding should be defined to utf8 in pylint/pylint/config/find_default_config_files.py, do you want to fix this yourself ?
Hi there,
I get the following error, when running pylint from spyder (on a single file):
Changing this line:
https://github.com/PyCQA/pylint/blob/5e1928b325bc798f5be1ab94031bf6816d058d9f/pylint/config/find_default_config_files.py#L29
to
makes it at least working. I don't know the rational behind this or how to force pylint to read setup.cfg encoded as
utf-8
. Putting# -*- coding: utf-8 -*-
on top of the file didn't help. Or should I prevent umlauts insetup.cfg
?!Am I missing something?
Cheers,
Sebastian
The text was updated successfully, but these errors were encountered: