opencv / opencv-python

Automated CI toolchain to produce precompiled opencv-python, opencv-python-headless, opencv-contrib-python and opencv-contrib-python-headless packages.
https://pypi.org/project/opencv-python/
MIT License
4.45k stars 837 forks source link

AttributeError: module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. #999

Open chilljudaoren opened 3 months ago

chilljudaoren commented 3 months ago

File "/home/czh/.conda/envs/czh/lib/python3.9/site-packages/numpy/init.py", line 324, in getattr raise AttributeError(__former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'object'. np.object was a deprecated alias for the builtin object. To avoid this error in existing code, use object by itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

chilljudaoren commented 3 months ago

python==3.9 Name: numpy Version: 1.26.4

Avasam commented 1 month ago

@chilljudaoren you didn't include your opencv-python version nor a minimal code reproduction.

chilljudaoren commented 1 month ago

What do you mean?

Avasam @.***> 于2024年8月2日周五 00:08写道:

@chilljudaoren https://github.com/chilljudaoren you didn't include your opencv-python version nor a minimal code reproduction.

— Reply to this email directly, view it on GitHub https://github.com/opencv/opencv-python/issues/999#issuecomment-2263438137, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFEXZ2XRNSL5MMJZEGXIJOTZPJMOFAVCNFSM6AAAAABJKNMLKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRTGQZTQMJTG4 . You are receiving this because you were mentioned.Message ID: @.***>