ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The problem is likely you're trying to execute Python 3 code with a Python 2 interpreter.

If /home/nel/PycharmProjects/AutoMec-AD/ROS/src/automec_ros/scripts/talker.py has /usr/bin/python as the shebang, and you have /usr/bin/python set to link to Python 2, this is the sort of error message you'd get.

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

Do not edit files in non-world-writable locations.

tcpros_base.py is used by hundreds of thousands of people and machines. The chances of it causing an error like this which needs you to edit it locally on your machine are almost zero (as such an obvious problem would most likely have already been detected and fixed).

In general: if you believe you need to edit a file in /opt/ros: do not do it and search either for a proper solution or report a bug.