Trouble with .pyc file in PYTHON 3 course!

I have this error!!

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 3, in <module>
    import rospy
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/", line 49, in <module>
    from .client import spin, myargv, init_node, \
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/", line 52, in <module>
    import roslib
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslib/", line 50, in <module>
    from roslib.launcher import load_manifest
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslib/", line 42, in <module>
    import rospkg
  File "/usr/lib/python2.7/dist-packages/rospkg/", line 41, in <module>
    from .manifest import InvalidManifest, Manifest, parse_manifest_file
  File "/usr/lib/python2.7/dist-packages/rospkg/", line 40, in <module>
    import xml.dom.minidom as dom
  File "/usr/lib/python2.7/xml/dom/", line 22, in <module>
    from xml.dom.xmlbuilder import DOMImplementationLS, DocumentLS
  File "/usr/lib/python2.7/xml/dom/", line 3, in <module>
    import copy
  File "/home/user/catkin_ws/src/robot_control/", line 1, in <module>
    """Generic (shallow and deep) copying operations.
ImportError: cannot import name RobotControl

Anybody can help me with this? All time that i start now a code with “python”, happens this error.


Thx, guys!! I solved this here. I erased a file called copy.pyc that i created for a file.

1 Like


Good to hear that you already solved the problem by removing the copy.pyc file you created previously. We are going to take into consideration your issue, in order to add some feedback in the Course.


1 Like