-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Closed
Description
System Information
OpenCV python: opencv-python-headless==4.8.0.74
Operating System / Platform: 10.0.19045 Build 19045
Python version: 3.9.13
Detailed description
cv2.__all__ and cv2.__version__ are missing from the stubs.
cv2.__version__ is useful for compatibility checks.
cv2.__all__ is important for type checkers to know which symbols are.
Runtime:
>>> from cv2 import *
>>> SORT_EVERY_ROW
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'SORT_EVERY_ROW' is not definedSteps to reproduce
>>> import cv2
>>> [x for x in dir(cv2) if x.startswith("__") and x.endswith("__")]
['__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__']import cv2
cv2.__all__ # "__all__" is not a known member of module "cv2"
cv2.__builtins__
cv2.__cached__
cv2.__doc__
cv2.__file__
cv2.__loader__
cv2.__name__
cv2.__package__
cv2.__path__
cv2.__spec__
cv2.__version__ # "__version__" is not a known member of module "cv2"Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)
Reactions are currently unavailable

