You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python examples/run_deoxys_with_space_mouse.py
Traceback (most recent call last):
File "examples/run_deoxys_with_space_mouse.py", line 4, in<module>
from deoxys.franka_interface import FrankaInterface
File "/home/abrar/hsc/deoxys_control/deoxys/deoxys/franka_interface/__init__.py", line 1, in<module>
from .franka_interface import FrankaInterface
File "/home/abrar/hsc/deoxys_control/deoxys/deoxys/franka_interface/franka_interface.py", line 10, in<module>
import deoxys.proto.franka_interface.franka_controller_pb2 as franka_controller_pb2
File "/home/abrar/hsc/deoxys_control/deoxys/deoxys/proto/franka_interface/franka_controller_pb2.py", line 36, in<module>
_descriptor.EnumValueDescriptor(
File "/home/abrar/miniconda3/envs/hsc/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 920, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
For now, I regenerate the Python files using protoc, which seems to resolve the issue. Here’s the command I use:
By the way, could you add an uninstall target in the Makefile? When I first ran
make -j build_deoxys=1
I built protobuf from source, but I used the default version (3.13.0). Now, I’d like to switch to a newer version. However, after checking out the desired protobuf version and re-running this command, it didn't update the installation as expected. The functionality is unaffected, but having an uninstall target would make it easier to manage version updates.
We currently build Deoxys using Protobuf 3. However, using a newer version of Protobuf in Python (e.g., protobuf==5.28.3) causes compatibility issues.
deoxys_control/deoxys/InstallPackage
Line 45 in 97396fd
For now, I regenerate the Python files using protoc, which seems to resolve the issue. Here’s the command I use:
The text was updated successfully, but these errors were encountered: