Traceback (most recent call last):
File "direct_cords_read.py", line 81, in <module>
device.move_to(current_x, y + draw_start_y, z_down, 0.0, wait=True)
File "/home/pi/.local/lib/python3.7/site-packages/pydobot/dobot.py", line 315, in move_to
self._set_ptp_cmd(x, y, z, r, mode=PTPMode.MOVL_XYZ, wait=wait)
File "/home/pi/.local/lib/python3.7/site-packages/pydobot/dobot.py", line 240, in _set_ptp_cmd
return self._send_command(msg, wait)
File "/home/pi/.local/lib/python3.7/site-packages/pydobot/dobot.py", line 103, in _send_command
expected_idx = struct.unpack_from('L', response.params, 0)[0]
AttributeError: 'NoneType' object has no attribute 'params'
def _send_command(self, msg, wait=False):
self.lock.acquire()
self._send_message(msg)
response = self._read_message()
self.lock.release()
if response is None:
print("Receive empty response")
return
if not wait:
return response
Hi,
After a few minutes with the Dobot Magician Lite I'm getting this exception, because of an empty response:
I found this solution, and added the if clause in the middle:
Best regards