Cannot solve error in XML document
I am working through Python 3 for Robotics on Robot Ignite website and am having issues when trying to execute a script.
The below .py script contains the following:
from robot_control_class import RobotControl
robotcontrol = RobotControl()
laser1 = robotcontrol.get_laser(0)
print ("The laser value received is: ", laser1)
laser2 = robotcontrol.get_laser(360)
print ("The laser value received is: ", laser2)
laser2 = robotcontrol.get_laser(719)
print ("The laser value received is: ", laser2)
When I try execute the script I get the following errors:
user:~/catkin_ws/src/robot_control$ ./variables.py
from: can't read /var/mail/robot_control_class
./variables.py: line 3: syntax error near unexpected token `('
./variables.py: line 3: `robotcontrol = RobotControl()'
I have tried to find the solution using XML validation through a website here https://www.xmlvalidation.com/
The error is at the first line of code. The XML validator states that "Content is not allowed in prolog" for the first line:
from robot_control_class import RobotControl
Does anyone know what I am doing wrong?
Edit:
Robot_control_class and RobotControl are classes and modules created and provided by Robot Ignite for training purposes.