Skip to content

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

@lexang

Description

@lexang

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions