Skip to content
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

TypeError: 'numpy._DTypeMeta' object is not subscriptable #970

Closed
lexang opened this issue Apr 2, 2024 · 2 comments
Closed

TypeError: 'numpy._DTypeMeta' object is not subscriptable #970

lexang opened this issue Apr 2, 2024 · 2 comments

Comments

@lexang
Copy link

lexang commented Apr 2, 2024

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"

@MDSALMANSHAMS
Copy link

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

@Avasam
Copy link

Avasam commented Jul 31, 2024

@lexang look at the pinned issue: #885 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants