I am encountering an AttributeError (type object 'Callable' has no attribute '_abc_registry') while running my Python 3.8 script:teleop_hand_and_arm.py, which uses libraries like meshcat, Pillow, and traitlets. The error appears when initializing visualization components or importing some modules. I’ve tried replacing typing with typing-extensions, reinstalling related libraries (pyzmq, traitlets, etc.), and verifying my setup, but the issue persists.I have attached the terminal output below for your reference, which includes the detailed error message and environment information.
(tv) xiaomin@humanoid:~/avp_teleoperate-h1/teleop$ python teleop_hand_and_arm.py
Serving file:///home/xiaomin/avp_teleoperate-h1/teleop at /static
Visit: https://vuer.ai?grid=False
/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/numpy/lib/twodim_base.py:295: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
v = asanyarray(v)
[2024-11-22 17:02:33.832] [SAPIEN] [warning] A second engine will share the same internal structures with the first one. Arguments passed to constructor will be ignored.
Initialize H1ArmController...
lowstate_subscriber is not ok! Please check dds.
Init q_pose is :[0.007064865902066231, 0.034940555691719055, -0.46080291271209717, 0.9766417741775513, -0.526340901851654, -0.008266612887382507, -0.03780411183834076, -0.46169817447662354, 0.9788788557052612, -0.534631073474884, 0.0034003257751464844, 0.0, 0.399502694606781, -0.01709398627281189, 0.010514974594116211, 0.15692627429962158, 0.4145529568195343, -0.011434435844421387, -0.004640936851501465, 0.15629041194915771]
Lock Leg...
Lock Leg OK!
Initialize H1ArmController OK!
Traceback (most recent call last):
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/meshcat/init.py", line 5, in
from . import visualizer
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/meshcat/visualizer.py", line 7, in
from IPython.display import HTML
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/IPython/init.py", line 52, in
from .core.application import Application
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/IPython/core/application.py", line 24, in
from traitlets.config.application import Application, catch_config_error
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/traitlets/init.py", line 4, in
import typing as _t
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/typing.py", line 1359, in
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/typing.py", line 1007, in new
self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'
I am encountering an AttributeError (type object 'Callable' has no attribute '_abc_registry') while running my Python 3.8 script:teleop_hand_and_arm.py, which uses libraries like meshcat, Pillow, and traitlets. The error appears when initializing visualization components or importing some modules. I’ve tried replacing typing with typing-extensions, reinstalling related libraries (pyzmq, traitlets, etc.), and verifying my setup, but the issue persists.I have attached the terminal output below for your reference, which includes the detailed error message and environment information.
(tv) xiaomin@humanoid:~/avp_teleoperate-h1/teleop$ python teleop_hand_and_arm.py Serving file:///home/xiaomin/avp_teleoperate-h1/teleop at /static Visit: https://vuer.ai?grid=False /home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/numpy/lib/twodim_base.py:295: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. v = asanyarray(v) [2024-11-22 17:02:33.832] [SAPIEN] [warning] A second engine will share the same internal structures with the first one. Arguments passed to constructor will be ignored. Initialize H1ArmController... lowstate_subscriber is not ok! Please check dds. Init q_pose is :[0.007064865902066231, 0.034940555691719055, -0.46080291271209717, 0.9766417741775513, -0.526340901851654, -0.008266612887382507, -0.03780411183834076, -0.46169817447662354, 0.9788788557052612, -0.534631073474884, 0.0034003257751464844, 0.0, 0.399502694606781, -0.01709398627281189, 0.010514974594116211, 0.15692627429962158, 0.4145529568195343, -0.011434435844421387, -0.004640936851501465, 0.15629041194915771] Lock Leg... Lock Leg OK! Initialize H1ArmController OK!
Traceback (most recent call last): File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/runpy.py", line 185, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/runpy.py", line 111, in _get_module_details import(pkg_name) File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/meshcat/init.py", line 5, in
from . import visualizer
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/meshcat/visualizer.py", line 7, in
from IPython.display import HTML
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/IPython/init.py", line 52, in
from .core.application import Application
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/IPython/core/application.py", line 24, in
from traitlets.config.application import Application, catch_config_error
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/traitlets/init.py", line 4, in
import typing as _t
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/typing.py", line 1359, in
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File "/home/xiaomin/anaconda3/envs/tv/lib/python3.8/site-packages/typing.py", line 1007, in new
self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'