Ask Your Question
1

ModuleNotFoundError: No module named 'SerialClient'

asked 2021-01-20 00:13:32 -0600

ryleymcc gravatar image

I have been using ros serial for a weeks to communicate with my Arduino. However, today when I ran the command

 rosrun rosserial_arduino serial_node.py /dev/ttyACM0

I got this error

Traceback (most recent call last):
  File "/home/ryley/catkin_ws/devel/lib/rosserial_arduino/serial_node.py", line 15, in <module>
    exec(compile(fh.read(), python_script, 'exec'), context)
  File "/home/ryley/catkin_ws/src/rosserial/rosserial_arduino/nodes/serial_node.py", line 37, in <module>
    from rosserial_arduino import SerialClient
  File "/home/ryley/catkin_ws/devel/lib/python3/dist-packages/rosserial_arduino/__init__.py", line 34, in <module>
    exec(__fh.read())
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'SerialClient'

I have source my workspace in both the roscore terminal and where I run the command. I just don't understand what could have affected rosserial since I used it yesterday.

I have had this error before when I first installed rosserial but a simple search gave me the fix of adding a "." in front, but this time its a different problem and i don't see any other solutions. the only thing I have changed is my usb cable but i know it works since i uploaded code to the Arduino with it. I tried filling the rosserial_python.py files with random characters to see if the error would change but its always the same error.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-01-21 06:04:08 -0600

ryleymcc gravatar image

The solution was to use the proper command.

rosrun rosserial_python serial_node.py /dev/ttyACM0
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2021-01-20 00:11:12 -0600

Seen: 80 times

Last updated: Jan 21 '21