Do I have an error with rospy file tcpros_base.py?
Firstly, I'd like to pardon for any rookie mistakes as I am starting to learn how to work with ROS. While following the tutorials for a publisher in python using rospy, I attempted to run on my command line and the following error occured:
File "/home/nel/PycharmProjects/AutoMec-AD/ROS/src/automec_ros/scripts/talker.py", line 39, 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 160
(e_errno, msg, *_) = e.args
^
SyntaxError: invalid syntax
So, what can I do to solve this? Should I reinstall ROS or was this my mistake? I'm using ROS Noetic. Thank you for your attention.
Did you manage to fix the error? I have the same error ...
Yes I did! Change the value on that file "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_base.py" from (e_errno, msg, *_) = e.args to (e_errno, msg) = e.args
Hey, I tried doing that, however, I can't make changes to that file, it says I don't have permission to do that. Could you elaborate on how you did it? I opened it using gedit and tried to edit it
You need to use sudo before gedit command. So it'd be "sudo gedit tcpros_base.py"