-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
import attr from attrs imports wrong package #1210
Comments
OK, I'm sorry, but how are we supposed to help you with that? It seems to be a packaging issue, caused by a VS Code extension that seems to bundle attrs!? My best suggestion is to reinstall |
There's also this: microsoft/vscode-pylint#386 |
For the starters do not name your packages the same as already existing packages, especially if those are installed as part of mainstream operating systems. |
What package would that be? |
attr (not attrs) and removing import attr from your package |
https://pypi.org/project/attr/ Attrs should shadow it with its own attr package but it is not working. I suggest not naming a package with a same name as another package in pip. |
Have you double-checked it's actually that package? On Ubuntu it is not:
|
2023-12-13 19:48:09.894 [info] from lsprotocol import types as lsp
File "/home/svobora/.vscode-server/extensions/ms-python.pylint-2023.10.1/bundled/libs/lsprotocol/types.py", line 14, in
import attrs
File "/home/svobora/.vscode-server/extensions/ms-python.pylint-2023.10.1/bundled/libs/attrs/init.py", line 3, in
from attr import (
ImportError: cannot import name 'AttrsInstance' from 'attr' (/usr/lib/python3/dist-packages/attr/init.py)
It imports attr package from system python folder (Ubuntu 22.04). What to do?
The text was updated successfully, but these errors were encountered: