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

i have a error "Traceback (most recent call last):" could you help me?

asked 2021-12-02 13:25:31 -0500

turkoahmet gravatar image

updated 2021-12-04 07:47:13 -0500

Mike Scheutzow gravatar image

~$ rosrun rosserial_python serial_node.py /dev/ttyACM0

Traceback (most recent call last): File "/home/ahmet/catkin_ws/src/rosserial/rosserial_python/nodes/serial_node.py", line 39, in <module> from rosserial_python import SerialClient, RosSerialServer File "/home/ahmet/catkin_ws/devel/lib/python2.7/dist-packages/rosserial_python/__init__.py", line 34, in <module> exec(__fh.read()) File "<string>", line 1, in <module> File "/home/ahmet/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 42, in <module> import queue ImportError: No module named queue"

When i used queue with capital Q in code, i have this error below.what should i do?

~$ rosrun rosserial_python serial_node.py /dev/ttyACM0

Traceback (most recent call last):

File "/home/ahmet/catkin_ws/src/rosserial/rosserial_python/nodes/serial_node.py", line 99, in <module> client.port.close() NameError: name 'client' is not defined

my ros is melodic version and python version is 2.7

edit retag flag offensive close merge delete

Comments

In Python 2 the module is Queue with capital Q.

osilva gravatar image osilva  ( 2021-12-02 14:49:05 -0500 )edit

i edited question a minute ago.i have last error that " ~$ rosrun rosserial_python serial_node.py /dev/ttyACM0

Traceback (most recent call last):

File "/home/ahmet/catkin_ws/src/rosserial/rosserial_python/nodes/serial_node.py", line 99, in <module> client.port.close() NameError: name 'client' is not defined "

turkoahmet gravatar image turkoahmet  ( 2021-12-02 15:02:03 -0500 )edit

@turkoahmet. If you got a response to a question then it should be accepted an another question started not edited for your future consideration.

osilva gravatar image osilva  ( 2021-12-02 15:05:29 -0500 )edit

Your answer may not be correct, after all, the error persists. ?

turkoahmet gravatar image turkoahmet  ( 2021-12-02 15:18:51 -0500 )edit

It’s a different error.

osilva gravatar image osilva  ( 2021-12-02 15:37:19 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-12-04 07:41:56 -0500

Mike Scheutzow gravatar image

This ros package is available from apt with name ros-melodic-rosserial-python, so ordinarily you should use that one.

You can choose to build it yourself from source, but you now have the responsibility to checkout the proper branch that works in melodic.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-12-02 13:25:31 -0500

Seen: 277 times

Last updated: Dec 04 '21