hzwer/ECCV2022-RIFE

AttributeError: module 'numpy' has no attribute 'float'.

Closed this issue · 1 comments

when I start to run ECCV2022-RIFE,an error occurred.
Loaded v3.x HD model. Traceback (most recent call last): File "/Users/xiaochenyue/Desktop/zjy/ECCV2022-RIFE/inference_video.py", line 124, in <module> lastframe = next(videogen) ^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/skvideo/io/io.py", line 251, in vreader reader = FFmpegReader(fname, inputdict=inputdict, outputdict=outputdict, verbosity=verbosity) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/skvideo/io/ffmpeg.py", line 103, in __init__ self.inputfps = np.float(parts[0])/np.float(parts[1]) ^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/numpy/__init__.py", line 305, in __getattr__ raise AttributeError(__former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'float'. np.floatwas a deprecated alias for the builtinfloat. To avoid this error in existing code, use floatby itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.float64 here. 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. Did you mean: 'cfloat'?

that's all the output.
seems there's something wrong with skvideo.would I change its version or another thing?
I'm using MacBook Pro,13-inch, M1, 2020,Ventura 13.5.

It seems that numpy needs to be downgraded to below 1.20.0.
Try: pip3 install numpy==1.16.0