-
Notifications
You must be signed in to change notification settings - Fork 767
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
"etree" is unknown import symbol (lxml) #392
Comments
lxml's Note that |
Installing the correct stubs fixed it for me, thanks for the hint. https://github.com/lxml/lxml-stubs pip install lxml-stubs |
Thanks for the tip; I didn't realize those had existed in typeshed but had been removed. We might be able to bundle them as we do with a few other commonly used libraries if lxml is common enough. |
I fact I suspect pylance ability to import submodules is partially broken because I see similar errors when importing submodules from my own package. Neither mypy, pylint or flake8 complain about them but pylance wrongly produces them. |
This issue is about @ssbarnea If you're having issues resolving imports, then please file a new issue as this issue is different. I'd be interested to see if downgrading Pylance fixes your issue. |
This issue has been fixed in version 2021.4.0, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202140-7-april-2021 |
Environment data
Actual behaviour
I use the library
lxml:4.5.2
and getting following error while importing, also autocomplete is not working. (https://lxml.de/)With language server set to
jedi
all is working fine.The text was updated successfully, but these errors were encountered: