Repository navigation
import cv2 not detected #2879
Description
Activity
They claim it's a pylint issue as well
I don't quite understand what the problem is. Are you not getting Intellisense? Or you getting a strange message from Pylint?
- addedbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from posterIssue requires more information from poster
on Oct 15, 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"]- added and removedbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
on Nov 20, 2018 Alexander Grund (@Flamefire) thanks! I copied the details over.
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.
- locked as resolved and limited conversation to collaborators
on Jan 10, 2019
Environment data
Actual behavior
Module 'cv2' has no [basically everything] member. (Runs perfectly when executed)
Expected behavior
No error.
Steps to reproduce:
Logs
Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)Output from
Consoleunder theDeveloper Toolspanel (toggle Developer Tools on underHelp)Additional Comments:
The error is basically because:
cv2\__init__.py:
cv2 imports stuff weird. No clue how you can detect that kind of stuff. Good luck lol