You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extension version (available under the Extensions sidebar): 2018.9.0
OS and version: Win 10
Python version (& distribution if applicable, e.g. Anaconda): 3.6.5
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): n/a
Relevant/affected Python packages and their versions: idk
Actual behavior
Module 'cv2' has no [basically everything] member. (Runs perfectly when executed)
Expected behavior
No error.
Steps to reproduce:
import cv2 and use a method
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
n/a
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)
n/a
Additional Comments:
The error is basically because:
cv2\__init__.py:
import importlib
from .cv2 import *
from .data import *
# wildcard import above does not import "private" variables like __version__
# this makes them available
globals().update(importlib.import_module('cv2.cv2').__dict__)
cv2 imports stuff weird. No clue how you can detect that kind of stuff. Good luck lol
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.
Activity
kelvinwop commentedon Oct 14, 2018
opencv/opencv-python#131
They claim it's a pylint issue as well
brettcannon commentedon Oct 15, 2018
I don't quite understand what the problem is. Are you not getting Intellisense? Or you getting a strange message from Pylint?
Flamefire commentedon Nov 20, 2018
There are already multiple issues on this, e.g. #1993
As this question comes up quite often even on SO (https://stackoverflow.com/questions/52668690/why-is-pylint-telling-me-module-cv2-has-no-member, https://stackoverflow.com/questions/50612169/pylint-not-recognizing-cv2-members) the correct answer should be provided here and in #1993 as it comes up in Google when looking for it (Don Jayamanne (@DonJayamanne) could you add it there too?)
Solution as described in pylint-dev/pylint#2426:
Add
--extension-pkg-whitelist=cv2to pylints arguments e.g. via"python.linting.pylintArgs": ["--extension-pkg-whitelist=cv2"]brettcannon commentedon Nov 20, 2018
Alexander Grund (@Flamefire) thanks! I copied the details over.
brettcannon commentedon Dec 13, 2018
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.