Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On launch of robogym servers, pb2 error, TypeError: Descriptors cannot not be created directly. #4

Closed
kirstyellis opened this issue Oct 7, 2022 · 2 comments

Comments

@kirstyellis
Copy link

Hi,

I am trying to use the robogym servers and am running into this issue on launch.

Details of my setup: Ubuntu 20, Ros Noetic, python 3.8.10

The command that I am running that results in the error:

roslaunch ur_robot_server ur_robot_server.launch ur_model:=ur10 gui:=true

The error:

Traceback (most recent call last):
File "/home/kirstyellis/robogym_ws/devel/lib/ur_robot_server/robot_server.py", line 15, in
exec(compile(fh.read(), python_script, 'exec'), context)
File "/home/kirstyellis/robogym_ws/src/robo-gym-robot-servers/ur_robot_server/scripts/robot_server.py", line 5, in
from ur_robot_server.ros_bridge import UrRosBridge
File "/home/kirstyellis/robogym_ws/src/robo-gym-robot-servers/ur_robot_server/src/ur_robot_server/ros_bridge.py", line 12, in
from robo_gym_server_modules.robot_server.grpc_msgs.python import robot_server_pb2
File "/home/kirstyellis/.local/lib/python3.8/site-packages/robo_gym_server_modules/robot_server/grpc_msgs/python/robot_server_pb2.py", line 36, in
_descriptor.FieldDescriptor(
File "/home/kirstyellis/.local/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 560, in new
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not 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).

Any ideas what is causing this? Has anyone else hit this issue?

Thanks!

@Adarsh3559
Copy link

pip install protobuf==3.20

This above command should make it work i guess

@kirstyellis
Copy link
Author

Thanks for the suggestion @Adarsh3559, the install instruction for the robogym servers included a command to update protobuf, so I thought maybe downgrading would cause conflict somewhere else. For now it seems OK. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants