Как исправить ошибку UnicodeDecodeError при запуске линтера Flake8?
Запускаю для некоторого файла Flake8
Возникает ошибка:
Traceback (most recent call last):
File "c:\python36\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python36\Scripts\flake8.exe\__main__.py", line 9, in
File "c:\python36\lib\site-packages\flake8\main\cli.py", line 16, in main
app.run(argv)
File "c:\python36\lib\site-packages\flake8\main\application.py", line 348, in run
self._run(argv)
File "c:\python36\lib\site-packages\flake8\main\application.py", line 335, in _run
self.initialize(argv)
File "c:\python36\lib\site-packages\flake8\main\application.py", line 319, in initialize
self.parse_configuration_and_cli(argv)
File "c:\python36\lib\site-packages\flake8\main\application.py", line 168, in parse_configuration_and_cli
self.option_manager, argv
File "c:\python36\lib\site-packages\flake8\options\aggregator.py", line 47, in aggregate_options
original_values.isolated)
File "c:\python36\lib\site-packages\flake8\options\config.py", line 282, in parse
return self.merge_user_and_local_config()
File "c:\python36\lib\site-packages\flake8\options\config.py", line 246, in merge_user_and_local_config
config = self.parse_local_config()
File "c:\python36\lib\site-packages\flake8\options\config.py", line 206, in parse_local_config
config = self.config_finder.local_configs()
File "c:\python36\lib\site-packages\flake8\options\config.py", line 107, in local_configs
config, found_files = self._read_config(self.local_config_files())
File "c:\python36\lib\site-packages\flake8\options\config.py", line 56, in _read_config
found_files = config.read(files)
File "c:\python36\lib\configparser.py", line 697, in read
self._read(fp, filename)
File "c:\python36\lib\configparser.py", line 1015, in _read
for lineno, line in enumerate(fp, start=1):
File "c:\python36\lib\encodings\cp1251.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 119: character maps to