This error is very common when using ROS to launch a python node, either via rosrun
or roslaunch
.
SOLUTION:
Does the file file.py
…
- exist in the package
package
? If not, create it! (Does the package itself exist and is it spelled correctly?). - have execute permissions? If not, make it executable by running:
chmod +x /path/to/file.py # replace '/path/to/file.py' by the real path of your file