zanoni-mbdyn / blendyn

MBDyn (https://www.mbdyn.org/) graphical post-processor for blender (https://www.blender.org/)
GNU General Public License v2.0
40 stars 8 forks source link

AttributeError: module 'numpy' has no attribute 'float' #56

Closed rockstorm101 closed 11 months ago

rockstorm101 commented 11 months ago

I get the error seen on the image below when hitting the "Animate scene" button.

Traceback (most recent call last):
  File "/home/rock/.config/blender/3.6/scripts/addons/blendyn-master/blendyn.py", line 1499, in invoke
    return self.execute(context)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/rock/.config/blender/3.6/scripts/addons/blendyn-master/blendyn.py", line 1488, in execute
    ret_val = set_motion_paths_mov(context)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rock/.config/blender/3.6/scripts/addons/blendyn-master/baselib.py", line 1066, in set_motion_paths_mov
    rw_mov = np.array(next(reader_mov)).astype(np.float)
                                               ^^^^^^^^
  File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.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'?
Error: Python: Traceback (most recent call last):
  File "/home/rock/.config/blender/3.6/scripts/addons/blendyn-master/blendyn.py", line 1499, in invoke
    return self.execute(context)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/rock/.config/blender/3.6/scripts/addons/blendyn-master/blendyn.py", line 1488, in execute
    ret_val = set_motion_paths_mov(context)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rock/.config/blender/3.6/scripts/addons/blendyn-master/baselib.py", line 1066, in set_motion_paths_mov
    rw_mov = np.array(next(reader_mov)).astype(np.float)
                                               ^^^^^^^^
  File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.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'?

-- System Information: Debian 13 Blender 3.6.2 Python 3.11.6 NumPy 1.24.2 Blendyn: commit https://github.com/zanoni-mbdyn/blendyn/commit/ee0853d5c4f79cb3f35c570d0e6558bcc457492a

-- Edit: Swapped error image with error text for (better?) readability.

zanoni-mbdyn commented 11 months ago

Should be fixed in bugfix now.

rockstorm101 commented 11 months ago

Hi @zanoni-mbdyn, thanks for the quick fix. I can confirm the issue is solved on the bugfix branch now.

zanoni-mbdyn commented 11 months ago

Good. Thank you, I will merge in master and close the issue.