Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'pyflakes.messages' has no attribute 'RedefinedInListComp' #721

Closed
jpetidis opened this issue Aug 2, 2022 · 6 comments
Labels

Comments

@jpetidis
Copy link

jpetidis commented Aug 2, 2022

Occuring on ubuntu latest (Github actions) - pyflakes==2.5.0.

When running pyflakes==2.4.0 - issue is resolved.

--- Performing pylama linting ---
pylama .
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.13/x64/bin/pylama", line 5, in
from pylama.main import shell
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/pylama/main.py", line 11, in
from pylama.check_async import check_async
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/pylama/check_async.py", line 8, in
from pylama.config import Namespace
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/pylama/config.py", line 13, in
from pylama.lint import LINTERS
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/pylama/lint/init.py", line 56, in
import_module(f"{name}.{pname}")
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/pylama/lint/pylama_pyflakes.py", line 12, in
m.RedefinedInListComp.message: "W0621",
AttributeError: module 'pyflakes.messages' has no attribute 'RedefinedInListComp'

@iflare3g
Copy link

iflare3g commented Aug 2, 2022

Thanks for reporting it! I'm having the same issue by using pylama hook in pre-commit and it works only if I bumps pyflakes to 2.4.0

@kalanatd
Copy link

kalanatd commented Aug 2, 2022

I am having the same issue, I can not use pylama and it throws the aforementioned error.

@iflare3g
Copy link

iflare3g commented Aug 2, 2022

I am having the same issue, I can not use pylama and it throws the aforementioned error.

in the meanwhile you make pylama working by bumping pyflakes to 2.4.0

@asottile
Copy link
Member

asottile commented Aug 2, 2022

this is not a pyflakes issue -- pylama is accessing errors that don't exist any more -- you should report it there

@iflare3g
Copy link

iflare3g commented Aug 2, 2022

Thanks so much @asottile !

@djbrown
Copy link

djbrown commented Aug 7, 2022

corresponding issue over at pylama would be klen/pylama#224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants