hello-robot/stretch_body

Numpy bool AttributeError from robot collision manager

Closed this issue · 1 comments

$ python3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import stretch_body.robot
/usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.26.4
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
/home/hello-robot/.local/lib/python3.10/site-packages/trimesh/voxel/runlength.py:205: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
  _ft = np.array([False, True], dtype=np.bool)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/hello-robot/.local/lib/python3.10/site-packages/stretch_body/robot.py", line 22, in <module>
    from stretch_body.robot_collision import RobotCollisionMgmt
  File "/home/hello-robot/.local/lib/python3.10/site-packages/stretch_body/robot_collision.py", line 4, in <module>
    import urchin as urdf_loader
  File "/home/hello-robot/.local/lib/python3.10/site-packages/urchin/__init__.py", line 1, in <module>
    from .urdf import (URDFType, URDFTypeWithMesh,
  File "/home/hello-robot/.local/lib/python3.10/site-packages/urchin/urdf.py", line 10, in <module>
    import trimesh
  File "/home/hello-robot/.local/lib/python3.10/site-packages/trimesh/__init__.py", line 34, in <module>
    from . import voxel
  File "/home/hello-robot/.local/lib/python3.10/site-packages/trimesh/voxel/__init__.py", line 1, in <module>
    from .base import VoxelGrid
  File "/home/hello-robot/.local/lib/python3.10/site-packages/trimesh/voxel/base.py", line 11, in <module>
    from . import morphology
  File "/home/hello-robot/.local/lib/python3.10/site-packages/trimesh/voxel/morphology.py", line 4, in <module>
    from . import encoding as enc
  File "/home/hello-robot/.local/lib/python3.10/site-packages/trimesh/voxel/encoding.py", line 7, in <module>
    from . import runlength as rl
  File "/home/hello-robot/.local/lib/python3.10/site-packages/trimesh/voxel/runlength.py", line 205, in <module>
    _ft = np.array([False, True], dtype=np.bool)
  File "/home/hello-robot/.local/lib/python3.10/site-packages/numpy/__init__.py", line 324, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` 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: 'bool_'?
>>> 

Solved with pip3 install -U trimesh