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

rclpy commend crushed in ROS2

asked 2018-10-31 08:32:31 -0600

MSS gravatar image

updated 2018-10-31 10:43:13 -0600

lucasw gravatar image

what is the mean of SYntaxError: invalid syntax ini rclpy/__init__.py? Please help this question

python db_reader.py
Traceback (most recent call last):
  File db_reader.py", line 3, in <module>
    import rclpy
  File "/opt/ros/bouncy/lib/python3.6/site-packages/rclpy/__init__.py", line 23
    def init(*, args=None):
              ^
SyntaxError: invalid syntax
edit retag flag offensive close merge delete

Comments

We're gonna need a lot more information to be of use here... What is db_reader.py?

allenh1 gravatar image allenh1  ( 2018-10-31 14:47:28 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-01-23 04:32:58 -0600

marguedas gravatar image

You're using Python 2 (python db_reader.py) but rclpy and all of ROS 2 supports only Python 3 so you should run the following python3 db_reader.py

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-10-31 08:32:31 -0600

Seen: 163 times

Last updated: Jan 23 '20