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

pylint and astroid AttributeError: 'Module' object has no attribute 'col_offset' #4671

Closed
AndreasLuckert opened this issue Jul 5, 2021 · 4 comments · Fixed by pylint-dev/astroid#1091
Labels
Blocker 🙅 Blocks the next release Cannot reproduce 🤷 Crash 💥 A bug that makes pylint crash Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade) Needs astroid update Needs an astroid update (probably a release too) before being mergable
Milestone

Comments

@AndreasLuckert
Copy link

AndreasLuckert commented Jul 5, 2021

As I'd already asked on StackOverFlow, versions 2.9.0 and 2.9.3 seem to have this bug.

A workaround is to downgrade pylint to version 2.8.3, which still works.

EDIT:

I've just updated the OP with all python-packages involved in this testing environment, as well listing some attempts which did not work out to solve the problem.

@Pierre-Sassoulas Pierre-Sassoulas added Crash 💥 A bug that makes pylint crash Blocker 🙅 Blocks the next release labels Jul 5, 2021
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.9.4 milestone Jul 5, 2021
@Pierre-Sassoulas Pierre-Sassoulas added Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade) Needs astroid update Needs an astroid update (probably a release too) before being mergable labels Jul 6, 2021
@Pierre-Sassoulas
Copy link
Member

Do you have an hint about the code that provoked the crash ? I'd want to add a regression test if possible (and also possibly do more than just avoid the crash and do the right thing). Ideally it would be a python file that would crash pylint with pylint a.py but simply the code around the problem could help too.

@AndreasLuckert
Copy link
Author

I'm afraid this is not possible at the moment to provide such information.
I'm working in a dev team on a complex project of a multi-national company involving highly confidential data.
Also, the code is built in a quite intricate and nested manner.

Let's hope that you will the issue, or other people experience similar problems and will be able to provide a full-working example code.

@Pierre-Sassoulas
Copy link
Member

Ok, thank you for providing as much details as you can 😄 Blind fix it is then :) Could you maybe tell me if there is still a crash when installing astroid via : pip install git+git://github.com/PyCQA/astroid.git@c37b6fd47b62486fd6cbe77b913b568b809f1a6d#egg=astroid, please ?

@AndreasLuckert
Copy link
Author

Thanks a lot for this hint!

Indeed, the combination

pip install pylint==2.9.3
pip install git+git://github.com/PyCQA/astroid.git@c37b6fd47b62486fd6cbe77b913b568b809f1a6d#egg=astroid

worked out without a failure (the entire AWS CodePipeline process testing and building the packages).

The dev team on my side decided that we're going to keep on using pylint==2.8.3 for this time being until there is a new official/stable version of pylint and astroid respectively.
Please let me know as soon as this is the case, so that we can update our build-scripts accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocker 🙅 Blocks the next release Cannot reproduce 🤷 Crash 💥 A bug that makes pylint crash Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade) Needs astroid update Needs an astroid update (probably a release too) before being mergable
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants