-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
OpenCV vs Pylint - E0611:no-name-in-module - #9566
Comments
I can reproduce that on Ubuntu 22.04 with Python 3.10.12. As a test file, I'm using import cv2
cv2.VideoCapture The steps for setup are: mkdir issue9566
cd issue9566/
python3 -m venv pyenv
source pyenv/bin/activate.fish
pip install --upgrade pip setuptools
pip install pylint==3.1.0
pip install opencv-python==4.9.0.80
python demo.py # no output, in particular no errors!
pylint --verbose demo.py This produces the following output
I looked into
Looking at https://stackoverflow.com/a/64130/1968182, an empty or partial |
Thank you for triaging @UlrichEckhardt, this is probably an issue with pylint not understanding python code that is "too dynamic" or C code inside OpenCV. Could require an astroid brain or an evolution in astroid to understand a particular dynamic code construct. |
I just tried to reproduce this in three ways:
In all three cases, |
Bug description
I have an issue with PyLint and OpenCV. Whenever I import something from openCV I get the following error Pylint (E0611:no-name-in-module). Why doesn't it see the models in the cv2 library, as it does with other libraries?
Configuration
No response
Command used
pylint $(git ls-files '*.py')
Pylint output
Behavior
This is the resulting behavior:
Pylint version
OS / Environment
Windows 11 23H2, Powershell
Additional dependencies
The text was updated successfully, but these errors were encountered: