dji-sdk / RoboMaster-SDK

DJI RoboMaster Python SDK and Sample Code for RoboMaster EP.
Apache License 2.0
312 stars 141 forks source link

KeyError: 'broadcast' when update to sdk robomaster-0.1.1.65 #57

Open tianb03 opened 2 years ago

tianb03 commented 2 years ago

I have updated to robomaster-0.1.1.65, in ubuntu 20.04 through pip3 install --upgrade robomaster

And also git pull the source code to test the examples.

Seems now I cannot execute all the scripts in multi_drone cos it will report KeyError: 'broadcast' when retrieve the broadcast address from ipinfo. In tool.py line 106.

So I downgraded to robomaster-0.1.1.63.

drezew commented 2 years ago

In Ubuntu 21.10 and robomaster-0.1.1.65 I also got the same error:

Traceback (most recent call last): File "/home/drezew/tmp/drones/main.py", line 86, in multi_drone.initialize(robot_num=2) File "/home/drezew/.pyenv/versions/drones/lib/python3.8/site-packages/multi_robomaster/multi_robot.py", line 272, in initialize self._robot_host_list = self._client.scan_multi_robot(robot_num) File "/home/drezew/.pyenv/versions/drones/lib/python3.8/site-packages/multi_robomaster/tool.py", line 320, in scan_multi_robot return self._conn.scan_multi_robot(num) File "/home/drezew/.pyenv/versions/drones/lib/python3.8/site-packages/multi_robomaster/tool.py", line 266, in scan_multi_robot robot_host_list = self._scan_host(num) File "/home/drezew/.pyenv/versions/drones/lib/python3.8/site-packages/multi_robomaster/tool.py", line 232, in _scan_host subnets, address = get_subnets() File "/home/drezew/.pyenv/versions/drones/lib/python3.8/site-packages/multi_robomaster/tool.py", line 106, in get_subnets broadcast = ipinfo['broadcast'] KeyError: 'broadcast'

2197808908a commented 1 year ago

I have updated to robomaster-0.1.1.65, in ubuntu 20.04 through pip3 install --upgrade robomaster

And also git pull the source code to test the examples.

Seems now I cannot execute all the scripts in multi_drone cos it will report KeyError: 'broadcast' when retrieve the broadcast address from ipinfo. In tool.py line 106.

So I downgraded to robomaster-0.1.1.63.

@tianb03 So now,rmtt_ros can not use?

tianb03 commented 1 year ago

I have updated to robomaster-0.1.1.65, in ubuntu 20.04 through pip3 install --upgrade robomaster And also git pull the source code to test the examples. Seems now I cannot execute all the scripts in multi_drone cos it will report KeyError: 'broadcast' when retrieve the broadcast address from ipinfo. In tool.py line 106. So I downgraded to robomaster-0.1.1.63.

@tianb03 So now,rmtt_ros can not use?

Simply downgrade to 0.1.1.63 and everything will be fine for rmtt_ros