UbiquityRobotics / ubiquity_motor

Package that provides a ROS interface for the motors in UbiquityRobotics robots
BSD 3-Clause "New" or "Revised" License
25 stars 24 forks source link

Python3 syntax errors on test_motor.py #120

Closed anfederman closed 3 years ago

anfederman commented 3 years ago

The default python for Noetic is python3. test_motor.py fails to run as both python2, or python3.

changed to import thread to import _thread and

You should have written except getopt.GetoptError as e: instead of except getopt.GetoptError, e: (2 occurences)

still complains on not being able to import smbus in either python2 or python3

I tried importing smbus2 as per Pi 4 python3 recomendations without fixing anything. I don't understand why test_motor needs smbus, since this is i2c, not usb.

anfederman commented 3 years ago

also the first line of the program is:

!/usr/bin/pythmn -u

(how did we miss that!)