Any Ideas what could be causing this error from a launch file? - TCPROS [closed]
I am converting the ros-trimble-bd960 package to read from a socket rather than serial port. I thought this was pretty straight forward as they read the same type of data but I just needed to change a few things in the code. I can upload what i have to a github repo if needed. I have tested the socket stream away from ROS and had no problems. I know this error is apparently something wrong with my python setup but would like some direction. Running both launch files gives the same error:
Traceback (most recent call last):
File "/home/user/catkin_ws/src/ros-trimble-bd960/scripts/gps.py", line 3, in <module>
import rospy
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/__init__.py", line 49, in <module>
from .client import spin, myargv, init_node, \
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/client.py", line 60, in <module>
import rospy.impl.init
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/init.py", line 54, in <module>
from .tcpros import init_tcpros
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros.py", line 45, in <module>
import rospy.impl.tcpros_service
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 54, in <module>
from rospy.impl.tcpros_base import TCPROSTransport, TCPROSTransportProtocol, \
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_base.py", line 167
(e_errno, msg, *_) = e.args
^
SyntaxError: invalid syntax
[gps-2] process has died [pid 13458, exit code 1, cmd /home/chase/catkin_ws/src/ros-trimble-bd960/scripts/gps.py __name:=gps __log:=/home/user/.ros/log/4dde074c-766b-11ed-978b-f7fbe9041b00/gps-2.log].
log file: /home/chase/.ros/log/4dde074c-766b-11ed-978b-f7fbe9041b00/gps-2*.log
Which Ubuntu do you have? If 20.04, you can install
python-is-python3
package to use Python 3.x as default one