You are not logged in.
Hello
Today I noticed that flake8 no longer works.
I get the following import error:
--------------------------------------------------------------------------------
[~]$ flake8
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/flake8/plugins/finder.py", line 291, in _load_plugin
obj = plugin.entry_point.load()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.11/site-packages/flake8/plugins/pycodestyle.py", line 26, in <module>
from pycodestyle import missing_whitespace_around_operator as _missing_whitespace_around_operator # noqa: E501
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'missing_whitespace_around_operator' from 'pycodestyle' (/usr/lib/python3.11/site-packages/pycodestyle.py)
--------------------------------------------------------------------------------
My system is uptodate.
Can anyone help?
Best regards
René
Last edited by rmnet (2023-12-22 16:44:48)
Offline
The reason is because python-pycodestyle was updated from 2.10.0-2 -> 2.11.0-1 a couple of days ago and so flake8 also needs an update 6.0.0 -> 6.0.1 to be compatible but it has not yet been updated. It is flagged and pending.
I downgraded python-pycodestyle to the previous version as that is probably the easiest temporary solution (i.e. `sudo pacman -U /var/cache/pacman/pkg/python-pycodestyle-2.10.0-2-any.pkg.tar.zst`).
Offline
Thanks for the help!
I have now also downgraded python-pycodestyle. Perfect temporary solution.
Offline