-
Couldn't load subscription status.
- Fork 155
Description
Hello,
I am encountering a persistent circular import error when trying to use unitree_sdk2py, even in a completely clean environment.
System Information:
- OS: Ubuntu
- Python: Tried with both Python 3.12 and Python 3.8 (using fresh Conda environments)
Problem:
When importing any part of the library, it fails with the following traceback:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/path/to/your/env/lib/python3.8/site-packages/unitree_sdk2py/init.py", line 1, in <module>
from . import idl, utils, core, rpc, go2, b2
ImportError: cannot import name 'b2' from partially initialized module 'unitree_sdk2py' (most likely due to a circular import) (/path/to/your/env/lib/python3.8/site-packages/unitree_sdk2py/init.py)
Steps to Reproduce:
This error can be reproduced reliably with the following steps in a clean Conda environment:
conda create -n bug_report_env python=3.8conda activate bug_report_envpip install -U pipgit clone https://github.com/unitreerobotics/unitree_sdk2_python.gitcd unitree_sdk2_pythonpip install .python -c "from unitree_sdk2py.core.channel import ChannelFactoryInitialize"
This consistently results in the ImportError. I have also tried installing via pip install unitree_sdk2py==1.0.1 directly, and the result is the same. The error seems to be in the package's structure itself.
Thank you for your help.