Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\tom\AppData\Roaming\Python\Python312\site-packages\flake8\__main__.py", line 7, in <module>
raise SystemExit(main())
^^^^^^
File "C:\Users\tom\AppData\Roaming\Python\Python312\site-packages\flake8\main\cli.py", line 23, in main
app.run(argv)
File "C:\Users\tom\AppData\Roaming\Python\Python312\site-packages\flake8\main\application.py", line 198, in run
self._run(argv)
File "C:\Users\tom\AppData\Roaming\Python\Python312\site-packages\flake8\main\application.py", line 186, in _run
self.initialize(argv)
File "C:\Users\tom\AppData\Roaming\Python\Python312\site-packages\flake8\main\application.py", line 165, in initialize
self.plugins, self.options = parse_args(argv)
^^^^^^^^^^^^^^^^
File "C:\Users\tom\AppData\Roaming\Python\Python312\site-packages\flake8\options\parse_args.py", line 53, in parse_args
opts = aggregator.aggregate_options(option_manager, cfg, cfg_dir, rest)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tom\AppData\Roaming\Python\Python312\site-packages\flake8\options\aggregator.py", line 30, in aggregate_options
parsed_config = config.parse_config(manager, cfg, cfg_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tom\AppData\Roaming\Python\Python312\site-packages\flake8\options\config.py", line 131, in parse_config
raise ValueError(
ValueError: Error code '#' supplied to 'extend-ignore' option does not match '^[A-Z]{1,3}[0-9]{0,3}$'
describe the problem
what I expected to happen
Note that this is with Python 3.12. I expected to get an output not a traceback. I am not including a sample program because I get the same traceback as the --bug-report output when I try to check any file.
Debug suggestions
There are multiple problems in config.parse_config(). Many of the ones I found were in lines that used stack[-1] but stack was an empty list at this point so there was no "-1" element.
There was one line in system.cfg that consisted of a single indented "#" but I deleted it and nothing changed.
how did you install flake8?
unmodified output of
flake8 --bug-report
describe the problem
what I expected to happen
Note that this is with Python 3.12. I expected to get an output not a traceback. I am not including a sample program because I get the same traceback as the --bug-report output when I try to check any file.
Debug suggestions
There are multiple problems in
config.parse_config()
. Many of the ones I found were in lines that usedstack[-1]
butstack
was an empty list at this point so there was no "-1" element.There was one line in system.cfg that consisted of a single indented "#" but I deleted it and nothing changed.