You are not logged in.

#1 2023-08-01 06:19:34

rmnet
Member
Registered: 2010-04-16
Posts: 12

[SOLVED] flake8 no longer works

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

#2 2023-08-01 06:59:41

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 713

Re: [SOLVED] flake8 no longer works

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

#3 2023-08-01 08:26:32

rmnet
Member
Registered: 2010-04-16
Posts: 12

Re: [SOLVED] flake8 no longer works

Thanks for the help!
I have now also downgraded python-pycodestyle. Perfect temporary solution.

Offline

Board footer

Powered by FluxBB