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 fails with "ImportError: cannot import name 'version'" #4402

Closed
musabhusaini opened this issue Apr 25, 2021 · 2 comments · Fixed by pylint-dev/astroid#976
Closed

Pylint fails with "ImportError: cannot import name 'version'" #4402

musabhusaini opened this issue Apr 25, 2021 · 2 comments · Fixed by pylint-dev/astroid#976

Comments

@musabhusaini
Copy link

Running pylint 2.3 on any set of files fails. This issue is fixed if astroid 2.5.3 is explicitly installed.

Steps to reproduce

Run pylint 2.3 on any set of files.

Current behavior

This error is received:

Traceback (most recent call last):
  File "/usr/local/bin/pylint", line 8, in <module>
    sys.exit(run_pylint())
  File "/usr/local/lib/python3.6/site-packages/pylint/__init__.py", line 17, in run_pylint
    from pylint.lint import Run
  File "/usr/local/lib/python3.6/site-packages/pylint/lint.py", line 77, in <module>
    from astroid.__pkginfo__ import version as astroid_version
ImportError: cannot import name 'version'

This is part of our CI checks and we just started getting this error a few hours ago.

Expected behavior

Linting should proceed without runtime errors.

pylint --version output

Result of pylint --version output:

Traceback (most recent call last):
  File "/usr/local/bin/pylint", line 8, in <module>
    sys.exit(run_pylint())
  File "/usr/local/lib/python3.6/site-packages/pylint/__init__.py", line 17, in run_pylint
    from pylint.lint import Run
  File "/usr/local/lib/python3.6/site-packages/pylint/lint.py", line 77, in <module>
    from astroid.__pkginfo__ import version as astroid_version
ImportError: cannot import name 'version'
@Pierre-Sassoulas
Copy link
Member

Thank you for the report, it's going to be fixed in astroid 2.5.6.

@musabhusaini
Copy link
Author

Thanks for the quick turnaround.

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

Successfully merging a pull request may close this issue.

2 participants