opencv-python icon indicating copy to clipboard operation
opencv-python copied to clipboard

TypeError: 'numpy._DTypeMeta' object is not subscriptable

Open lexang opened this issue 1 year ago • 1 comments

Expected behaviour

Write here how did you expect the library to function.

Actual behaviour

File "D:\anaconda3\lib\site-packages\cv2_init_.py", line 181, in bootstrap() File "D:\anaconda3\lib\site-packages\cv2_init_.py", line 175, in bootstrap if _load_extra_py_code_for_module("cv2", submodule, DEBUG): File "D:\anaconda3\lib\site-packages\cv2_init.py", line 28, in _load_extra_py_code_for_module py_module = importlib.import_module(module_name) File "D:\anaconda3\lib\importlib_init.py", line 127, in import_module return _bootstrap.gcd_import(name[level:], package, level) File "D:\anaconda3\lib\site-packages\cv2\typing_init.py", line 69, in NumPyArrayGeneric = numpy.ndarray[typing.Any, numpy.dtype[numpy.generic]] TypeError: 'numpy._DTypeMeta' object is not subscriptable

Steps to reproduce

python version= 3.10 numpy version = "1.26.4" opencv-python_version = "4.9.0.80"

lexang avatar Apr 02 '24 06:04 lexang

Hi @lexang, can u please share your codes, for better understanding.

MDSALMANSHAMS avatar Apr 08 '24 09:04 MDSALMANSHAMS

@lexang look at the pinned issue: https://github.com/opencv/opencv-python/issues/885#issuecomment-1672654460

Avasam avatar Jul 31 '24 17:07 Avasam