Problems with importing from robot_control_class

Hi, I just started on the free package and i am on the 3rd unit and it is not letting me import RobotControl. It says dynamic module does not define module export function

1 Like

I got the same problem:

(py3venv) user:~/catkin_ws/src/robot_control$ python
Traceback (most recent call last):
  File "", line 1, in <module>
    from robot_control_class import RobotControl
  File "/home/simulations/public_sim_ws/src/all/ros_basics_examples/python_course_class/", line 7, in <module>
    from tf.transformations import euler_from_quaternion, quaternion_from_euler
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf/", line 28, in <module>
    from tf2_ros import TransformException as Exception, ConnectivityException, LookupException, ExtrapolationException
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf2_ros/", line 38, in <module>
    from tf2_py import *
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf2_py/", line 38, in <module>
    from ._tf2 import *
ImportError: dynamic module does not define module export function (PyInit__tf2)

it might be a bug, but I don’t know

Do you know anything about this @albertoezquerro?

Hello @pietro.oliva and @lesueur.marlon,

The problem is that you are forgetting to source the special ROS-Python 3 workspace, as indicated in the instructions:

source ~/.catkin_ws_python3/devel/setup.bash


thank you so much albertoezquerro