bitcraze / crazyflie-clients-python

Host applications and library for Crazyflie written in Python.
Other
301 stars 468 forks source link

np.int deprecated #673

Closed darshit-desai closed 11 months ago

darshit-desai commented 1 year ago

My cfclient installation was working fine when this error started to show up in my terminal

darshit@darshit-Inspiron-5558:~/crazyflie-clients-python$ python3 -m cfclient.gui
INFO:__main__:Disabling STL printouts
INFO:cfclient.utils.input.inputreaders:Input readers: ['linuxjsdev', 'pysdl2']
INFO:cfclient.utils.input.inputreaders:Successfully initialized [linuxjsdev]
INFO:cfclient.utils.input.inputreaders:Could not initialize [pysdl2]: No SDL2 support on Linux
INFO:cfclient.utils.input.inputinterfaces:Found interfaces: ['leapmotion', 'wiimote', 'zmqpull']
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [leapmotion]: Leap Motion library probably not installed (No module named 'leapsdk')
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [wiimote]: Missing cwiid (wiimote) driver No module named 'cwiid'
INFO:cfclient.utils.config:Dist config read from /home/darshit/crazyflie-clients-python/src/cfclient/configs/config.json
INFO:cfclient.utils.config:Config file read from [/home/darshit/.config/cfclient/config.json]
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [zmqpull]: ZMQ input disabled in config file
INFO:OpenGL.acceleratesupport:No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
===== 2023.08.23 16:08:07 =====
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/darshit/crazyflie-clients-python/src/cfclient/gui.py", line 200, in <module>
    main()
  File "/home/darshit/crazyflie-clients-python/src/cfclient/gui.py", line 164, in main
    from .ui.main import MainUI
  File "/home/darshit/crazyflie-clients-python/src/cfclient/ui/main.py", line 36, in <module>
    import cfclient.ui.tabs
  File "/home/darshit/crazyflie-clients-python/src/cfclient/ui/tabs/__init__.py", line 42, in <module>
    from .locopositioning_tab import LocoPositioningTab
  File "/home/darshit/crazyflie-clients-python/src/cfclient/ui/tabs/locopositioning_tab.py", line 52, in <module>
    from vispy import scene
  File "/home/darshit/.local/lib/python3.8/site-packages/vispy/scene/__init__.py", line 33, in <module>
    from .visuals import *  # noqa
  File "/home/darshit/.local/lib/python3.8/site-packages/vispy/scene/visuals.py", line 18, in <module>
    from .. import visuals
  File "/home/darshit/.local/lib/python3.8/site-packages/vispy/visuals/__init__.py", line 49, in <module>
    from .graphs import GraphVisual  # noqa
  File "/home/darshit/.local/lib/python3.8/site-packages/vispy/visuals/graphs/__init__.py", line 1, in <module>
    from .graph import GraphVisual  # noqa
  File "/home/darshit/.local/lib/python3.8/site-packages/vispy/visuals/graphs/graph.py", line 14, in <module>
    from . import layouts
  File "/home/darshit/.local/lib/python3.8/site-packages/vispy/visuals/graphs/layouts/__init__.py", line 10, in <module>
    from .networkx_layout import NetworkxCoordinates
  File "/home/darshit/.local/lib/python3.8/site-packages/vispy/visuals/graphs/layouts/networkx_layout.py", line 7, in <module>
    import networkx as nx
  File "/usr/lib/python3/dist-packages/networkx/__init__.py", line 115, in <module>
    import networkx.readwrite
  File "/usr/lib/python3/dist-packages/networkx/readwrite/__init__.py", line 15, in <module>
    from networkx.readwrite.graphml import *
  File "/usr/lib/python3/dist-packages/networkx/readwrite/graphml.py", line 314, in <module>
    class GraphML(object):
  File "/usr/lib/python3/dist-packages/networkx/readwrite/graphml.py", line 346, in GraphML
    (np.int, "int"), (np.int8, "int"),
  File "/home/darshit/.local/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
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
krichardsson commented 1 year ago

It looks like this comes from vispy or a dependency of it. Could you run a pip3 list to share what versions you have?

knmcguire commented 11 months ago

closed due to inactivity. Please start a discussion in https://discussions.bitcraze.io/ if installing issues remains