bluerobotics / ping-python

Python scripts and examples for the Ping sonar.
MIT License
40 stars 31 forks source link

Error Ping on simulation #58

Closed senceryazici closed 5 years ago

senceryazici commented 5 years ago

python tools/ping1d-simulation.py

Traceback (most recent call last):
  File "tools/ping1d-simulation.py", line 162, in <module>
    sim.sendMessage(PING1D_PROFILE)
  File "tools/ping1d-simulation.py", line 76, in sendMessage
    msg.pack_msg_data()
  File "/Users/senceryazici/Local Documents/auv/ping-python/brping/pingmessage.py", line 487, in pack_msg_data
    self.msg_data = bytearray(struct.pack(msg_format, *values))
struct.error: argument for 's' must be a string
patrickelectric commented 5 years ago

Which version of Python are you using ? Only Python 3 is supported.

senceryazici commented 5 years ago

Your answer got me thinking and I realized that the python version problem occurred because another installation messed up the PATH variable, so I was using the wrong python. Thanks.