# UNIT 4 ImportError: No module named action

**URL:** <https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037>\
**Category:** ROS Basics In 5 Days (Python)\
**Tags:** error\
**Created:** [January 22, 2020, 3:32pm UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037 "2020-01-22T15:32:54Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![quentin.roudier](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/quentin.roudier/32/10_2.png) [@quentin.roudier](https://get-help.theconstruct.ai/u/quentin.roudier)\
**Post date:** [January 22, 2020, 3:32pm UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/1 "2020-01-22T15:32:55Z")

</div>

Hello everyone,

I tried to make the quiz of the UNIT 4 but I have the following error :

ROS\_MASTER\_URI=http://master:11311

process[move\_drone\_up\_down-1]: started with pid [21804]  
Traceback (most recent call last):  
File “/home/user/catkin\_ws/src/actions\_quiz/src/actions\_quiz.py”, line 6, in   
from actions\_quiz.action import CustomActionMsgFeedback, CustomActionMsgResult, CustomActionMsgAction  
File “/home/user/catkin\_ws/src/actions\_quiz/src/actions\_quiz.py”, line 6, in   
from actions\_quiz.action import CustomActionMsgFeedback, CustomActionMsgResult, CustomActionMsgAction  
**ImportError: No module named action**  
[move\_drone\_up\_down-1] process has died [pid 21804, exit code 1, cmd /home/user/catkin\_ws/src/actions\_quiz/src/actions\_quiz.py \_\_name:=move\_drone\_up\_down \_\_log:=/home/user/.ros/log/89077374-3d13-11ea-bbe0-0afd0f4a4f44/move\_drone\_up\_down-1.log].  
log file: /home/user/.ros/log/89077374-3d13-11ea-bbe0-0afd0f4a4f44/move\_drone\_up\_down-1\*.log  
all processes on machine have died, roslaunch will exit  
shutting down processing monitor…  
… shutting down processing monitor complete  
done

You can find below the beginning of my code :

#! /usr/bin/env python

import rospy

import time

import actionlib

from actions\_quiz.action import CustomActionMsgFeedback, CustomActionMsgResult, CustomActionMsgAction

from std\_msgs.msg import Empty

I tried a lot of things but now, with 3 hours approximately of looking for a solution, I’m asking for some help.

I can share my code in PM of course

---

<div class="post-metadata">

**Author:** ![duckfrost2](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/duckfrost2/32/9365_2.png) [@duckfrost2](https://get-help.theconstruct.ai/u/duckfrost2)\
**Post date:** [January 22, 2020, 5:00pm UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/2 "2020-01-22T17:00:48Z")

</div>

Please share here your code so that we may be able to debug. Please tell us the course, unit and commands to reproduce.

---

<div class="post-metadata">

**Author:** ![quentin.roudier](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/quentin.roudier/32/10_2.png) [@quentin.roudier](https://get-help.theconstruct.ai/u/quentin.roudier)\
**Post date:** [January 22, 2020, 5:06pm UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/3 "2020-01-22T17:06:45Z")

</div>

Thank you for your answer,

you can find below my launch :

launch  
node pkg=“actions\_quiz” type=“actions\_quiz.py” name=“move\_drone\_up\_down” output=“screen” /  
/launch

PS : For uknown reasons, I can’t use the signs \< and \> when I’m writing here…

my action file:

string goal

* * *

* * *

string feedback

**my py file** :

#! /usr/bin/env python  
import rospy  
import time  
import actionlib

from actions\_quiz.action import CustomActionMsgFeedback, CustomActionMsgResult, CustomActionMsgAction  
from std\_msgs.msg import Empty

class MoveUpDownClass(object):

\_feedback = CustomActionMsgFeedback()  
\_result = CustomActionMsgResult()  
def **init** (self):  
# creates the action server  
self.\_as = actionlib.SimpleActionServer(“action\_custom\_msg\_as”, CustomActionMsgAction, self.goal\_callback, False)  
self.\_as.start()  
self.ctrl\_c = False  
self.rate = rospy.Rate(10)

def publish\_once\_in\_cmd\_vel(self, cmd):  
“”"  
This is because publishing in topics sometimes fails teh first time you publish.  
In continuos publishing systems there is no big deal but in systems that publish only  
once it IS very important.  
“”"  
while not self.ctrl\_c:  
connections = self.\_pub\_cmd\_vel.get\_num\_connections()  
if connections \> 0:  
self.\_pub\_cmd\_vel.publish(cmd)  
rospy.loginfo(“Publish in cmd\_vel…”)  
break  
else:  
self.rate.sleep()

def up\_drone(self):  
while not i == 3:  
self.\_pub\_takeoff.publish(self.\_takeoff\_msg)  
rospy.loginfo(‘Taking off…’)  
time.sleep(1)  
i += 1  
def down\_drone(self):  
while not i == 3:  
self.\_pub\_land.publish(self.\_land\_msg)  
rospy.loginfo(‘Landing…’)  
time.sleep(1)  
i += 1  
def goal\_callback(self, goal):  
self.\_pub\_takeoff = rospy.Publisher(’/drone/takeoff’, Empty, queue\_size=1)  
self.\_takeoff\_msg = Empty()  
self.\_pub\_land = rospy.Publisher(’/drone/land’, Empty, queue\_size=1)  
self.\_land\_msg = Empty()  
word = goal.goal  
if word == TAKEOFF:  
self.up\_drone()  
rospy.loginfo(‘ca va monter’)

```
if word == LAND:
    self.down_drone()
    rospy.loginfo('ca va descendre')

```

if **name** == ‘ **main** ’:  
rospy.init\_node(‘move\_drone\_up\_down’)  
MoveSquareClass()  
rospy.spin()

The command to reproduce is the following ; **roslaunch action\_custom\_msg.launch**

Don’t hesitate to tell me if you need something else

---

<div class="post-metadata">

**Author:** ![duckfrost2](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/duckfrost2/32/9365_2.png) [@duckfrost2](https://get-help.theconstruct.ai/u/duckfrost2)\
**Post date:** [January 22, 2020, 5:23pm UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/4 "2020-01-22T17:23:55Z")

</div>

Ok I’ll have a look . I highly recomend you to use gits to share your wok, because it helps us have the exact same code, without having to edit it and create packages and everything

---

<div class="post-metadata">

**Author:** ![duckfrost2](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/duckfrost2/32/9365_2.png) [@duckfrost2](https://get-help.theconstruct.ai/u/duckfrost2)\
**Post date:** [January 22, 2020, 5:56pm UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/5 "2020-01-22T17:56:13Z")

</div>

> [@quentin.roudier](#):
>
> #! /usr/bin/env python  
> import rospy  
> import time  
> import actionlib
> 
> from actions\_quiz.action import CustomActionMsgFeedback, CustomActionMsgResult, CustomActionMsgAction  
> from std\_msgs.msg import Empty
> 
> class MoveUpDownClass(object):
> 
> \_feedback = CustomActionMsgFeedback()  
> \_result = CustomActionMsgResult()  
> def **init** (self):
> 
> # creates the action server
> 
> self.\_as = actionlib.SimpleActionServer(“action\_custom\_msg\_as”, CustomActionMsgAction, self.goal\_callback, False)  
> self.\_as.start()  
> self.ctrl\_c = False  
> self.rate = rospy.Rate(10)
> 
> def publish\_once\_in\_cmd\_vel(self, cmd):  
> “”"  
> This is because publishing in topics sometimes fails teh first time you publish.  
> In continuos publishing systems there is no big deal but in systems that publish only  
> once it IS very important.  
> “”"  
> while not self.ctrl\_c:  
> connections = self.\_pub\_cmd\_vel.get\_num\_connections()  
> if connections \> 0:  
> self.\_pub\_cmd\_vel.publish(cmd)  
> rospy.loginfo(“Publish in cmd\_vel…”)  
> break  
> else:  
> self.rate.sleep()
> 
> def up\_drone(self):  
> while not i == 3:  
> self.\_pub\_takeoff.publish(self.\_takeoff\_msg)  
> rospy.loginfo(‘Taking off…’)  
> time.sleep(1)  
> i += 1  
> def down\_drone(self):  
> while not i == 3:  
> self.\_pub\_land.publish(self.\_land\_msg)  
> rospy.loginfo(‘Landing…’)  
> time.sleep(1)  
> i += 1  
> def goal\_callback(self, goal):  
> self.\_pub\_takeoff = rospy.Publisher(’/drone/takeoff’, Empty, queue\_size=1)  
> self.\_takeoff\_msg = Empty()  
> self.\_pub\_land = rospy.Publisher(’/drone/land’, Empty, queue\_size=1)  
> self.\_land\_msg = Empty()  
> word = goal.goal  
> if word == TAKEOFF:  
> self.up\_drone()  
> rospy.loginfo(‘ca va monter’)
> 
> ```auto
> if word == LAND:
> self.down_drone()
> rospy.loginfo('ca va descendre')
> 
> ```
> 
> if **name** == ‘ **main** ’:  
> rospy.init\_node(‘move\_drone\_up\_down’)  
> MoveSquareClass()  
> rospy.spin()

Here you have the file corrected. There were loads of things that were missing : [custom\_as.py · GitHub](https://gist.github.com/RDaneelOlivav/b0a040b32f8d2b8717117f0f45f94f2c)

Please have a look at the examples, and also check your keyboard layout because it seems that it is using some code not compatible with python code normally.

---

<div class="post-metadata">

**Author:** ![quentin.roudier](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/quentin.roudier/32/10_2.png) [@quentin.roudier](https://get-help.theconstruct.ai/u/quentin.roudier)\
**Post date:** [January 23, 2020, 8:59am UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/6 "2020-01-23T08:59:39Z")

</div>

Thank you for your answer! Indeed, I forgot some things on my code. But when I launch it, I still have the same error (but this time it’s “no module named msg” instead of “no module named action” :

 ![image](https://get-help.robotigniteacademy.com/uploads/default/original/1X/ebd7849320e3b3a4710bc7c162a7b40d1087ccca.png)

I think it’s maybe a problem in my folder tree, I’ll try to find a solution.  
 ![image](https://get-help.robotigniteacademy.com/uploads/default/original/1X/abe7708dbf632ec06121ea6cf9ae04be4b12cb0e.png)  
If you have any idea of what the problem is, don’t hesitate to tell me.

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [January 23, 2020, 11:06am UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/7 "2020-01-23T11:06:55Z")

</div>

Hi @quentin.roudier,

Please also check the following:

- Have you run `catkin_make` again, after modifying your files?
- Have you run `source devel/setup.bash` oN EVERY SHELL after running `catkin_make`?

If it still doesn’t work, then I suggest you look at the examples more closely and correct your code as necessary, as suggested by @duckfrost.

---

<div class="post-metadata">

**Author:** ![quentin.roudier](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/quentin.roudier/32/10_2.png) [@quentin.roudier](https://get-help.theconstruct.ai/u/quentin.roudier)\
**Post date:** [January 23, 2020, 1:42pm UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/8 "2020-01-23T13:42:55Z")

</div>

Hello Bayodesegun,

Thanks for your answer. I ran the source devel/setup.bash one every shell but I still have the same error…  
I’ll try to find the error by myself but don’t hesitate to tell me if you have an idea.

---

<div class="post-metadata">

**Author:** ![quentin.roudier](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/quentin.roudier/32/10_2.png) [@quentin.roudier](https://get-help.theconstruct.ai/u/quentin.roudier)\
**Post date:** [January 24, 2020, 8:50am UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/9 "2020-01-24T08:50:07Z")

</div>

Hello everyone,

So I finally gave up and made correct my quiz (with a painful 3.5, painful because I think my code was pretty similar) but, even when I launched the solution, I still have the same error, I used all the files of the solution and checked each folder name but it’s still the same…

Im going to the next lesson but if someone has an idea of what the could be the origin of the error, it would be interesting.

---

<div class="post-metadata">

**Author:** ![albertoezquerro](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/albertoezquerro/32/7031_2.png) [@albertoezquerro](https://get-help.theconstruct.ai/u/albertoezquerro)\
**Post date:** [January 24, 2020, 9:26am UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/10 "2020-01-24T09:26:22Z")

</div>

Hello @quentin.roudier,

I suggest you change the name of the Python file, **actions\_quiz.py**. Your package ( **actions\_quiz** ) and your Python script ( **actions\_quiz.py** ) have the same name and this might cause some importing issues, because ROS might try to do the imports from the script instead of the package. Try to change the name of the script to, for instance, **actions\_quiz\_code.py** and let me know if it solves your issues.

Best,

---

<div class="post-metadata">

**Author:** ![quentin.roudier](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/quentin.roudier/32/10_2.png) [@quentin.roudier](https://get-help.theconstruct.ai/u/quentin.roudier)\
**Post date:** [January 24, 2020, 9:50am UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/11 "2020-01-24T09:50:38Z")

</div>

Hello albertoezquerro,

Thank you for your answer and for your help. I changed the name of the script, I obviously modified my launch file but, one more time, I have the same error :

 ![image](https://get-help.robotigniteacademy.com/uploads/default/original/1X/5801f64b75a8ef8d9e9f937b459813444cddbd02.png)  
I launched the code of the solution by the way. I think it’s certainly a problem in my folder tree but of course I don’t find it :  
 ![image](https://get-help.robotigniteacademy.com/uploads/default/original/1X/55ab0547847a0a8f8c2cc17768ecec1ede936621.png)

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [January 24, 2020, 10:40am UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/12 "2020-01-24T10:40:24Z")

</div>

@quentin.roudier,

Sorry for all the trouble. But don’t worry, it will pass. It’s just a learning stage.

The error is saying that it cannot find the `msg` directory, and that suggests that the messages have not been created perhaps because you have not done the setup required in CMakeLists.txt and package.xml…This directory is created automatically _during catkin\_make_ if the system finds the required information to create them.

I suggest that you:

1. Go over the instructions in Unit `9- Understanding ROS Actions - Servers` under the heading **How to prepare CMakeLists.txt and package.xml files for custom action messages compilation** and ensure you have modified the files accordingly. If you have done it before, please go over what you have done to ensure everything is correctly done.
2. Run `catkin_make` and `source devel/setup.bash` again.

PS: If the setup is right, you should see some output on the terminal during `catkin_make` that indicates that some messages are being generated. Something like:

```auto
[2%] Generating Python from MSG actions_quiz/CustomActionMsgGoal
[5%] Generating Python from MSG actions_quiz/CustomActionMsgAction
[8%] Generating Python from MSG actions_quiz/CustomActionMsgActionFeedback

```

---

<div class="post-metadata">

**Author:** ![quentin.roudier](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/quentin.roudier/32/10_2.png) [@quentin.roudier](https://get-help.theconstruct.ai/u/quentin.roudier)\
**Post date:** [January 24, 2020, 12:34pm UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/13 "2020-01-24T12:34:02Z")

</div>

Thank you for your help, I already checked about the CMakeLists.txt and the package.xml. At the beginning, I had the same thing than the solution except I had the std\_msgs lines. I tried with the CMakeLists.txt and the package.xml of the solution but I still have this error.

I don’t have these lines btw :  
[2%] Generating Python from MSG actions\_quiz/CustomActionMsgGoal  
[5%] Generating Python from MSG actions\_quiz/CustomActionMsgAction  
[8%] Generating Python from MSG actions\_quiz/CustomActionMsgActionFeedback

 ![image](https://get-help.robotigniteacademy.com/uploads/default/original/1X/9f00533483c0d35c06343814fec49b88f5a23502.png)

---

<div class="post-metadata">

**Author:** ![albertoezquerro](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/albertoezquerro/32/7031_2.png) [@albertoezquerro](https://get-help.theconstruct.ai/u/albertoezquerro)\
**Post date:** [January 24, 2020, 6:24pm UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/14 "2020-01-24T18:24:26Z")

</div>

Hi @quentin.roudier,

From the error you copied above, you can see that it’s still executing a file named **actions\_quiz.py**. Make sure that you remove that file and all the references to it, and that you only have the **actions\_quiz\_code.py** file.

Also, remove the **build** and **devel** folders and compile everything again.

```
cd ~/catkin_ws/
rm -rf build devel
catkin_make
source devel/setup.bash 

```

Best,

---

<div class="post-metadata">

**Author:** ![quentin.roudier](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/quentin.roudier/32/10_2.png) [@quentin.roudier](https://get-help.theconstruct.ai/u/quentin.roudier)\
**Post date:** [January 26, 2020, 10:36am UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/15 "2020-01-26T10:36:52Z")

</div>

Hi albertoezquerro,

Thank you for your answer! Indeed, I didn’t pay attention at that part of the error message. So I guess you find the origin of the problem. But the actions\_quiz.py has already been removed from the folder as you can see :  
 ![image](https://get-help.robotigniteacademy.com/uploads/default/original/1X/688620e4342da0bd823f7d6fa2537e0be8fa1ee5.png)  
Maybe the obsolet py code is more hidden than removed, I don’t know 🤔…

I still ran these lines btw:

cd ~/catkin\_ws/  
rm -rf build devel  
catkin\_make  
source devel/setup.bash

But I have still the same error :

 ![image](https://get-help.robotigniteacademy.com/uploads/default/original/1X/74ad065d9f9b59e38aa7966a9d94c51a692d3000.png)

So, as I said before, maybe the code is not totally removed? I checked in the other files and I haven’t found any references to the old py code…

---

<div class="post-metadata">

**Author:** ![albertoezquerro](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/albertoezquerro/32/7031_2.png) [@albertoezquerro](https://get-help.theconstruct.ai/u/albertoezquerro)\
**Post date:** [January 26, 2020, 6:49pm UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/16 "2020-01-26T18:49:06Z")

</div>

Hi @quentin.roudier,

Hmm… that’s pretty strange. Have a look inside the **src** folder through the WebShell, using the **ls** command, to check that there isn’t any Python compiled file, which have the extension **.pyc** and they don’t show up on the IDE. If you find a file named **actions\_quiz.pyc** , remove it.

That’s the only explanation I can think of right now.

Best,

---

<div class="post-metadata">

**Author:** ![quentin.roudier](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/quentin.roudier/32/10_2.png) [@quentin.roudier](https://get-help.theconstruct.ai/u/quentin.roudier)\
**Post date:** [January 27, 2020, 8:43am UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/17 "2020-01-27T08:43:35Z")

</div>

Hi albertoezquerro,

Thank you very much for your answer, you solved the problem. Indeed, the actions\_quiz.pyc wasn’t removed. Now the program is perfectly working. Thank you everyone for the time you dedicated on my problem!

---

<div class="post-metadata">

**Author:** ![umberto.severino](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/u/ecb155/32.png) [@umberto.severino](https://get-help.theconstruct.ai/u/umberto.severino)\
**Post date:** [December 17, 2020, 6:59pm UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/18 "2020-12-17T18:59:15Z")

</div>

Same problem here, but with .action:

 ![immagine](https://get-help.robotigniteacademy.com/uploads/default/original/2X/f/fcb9d834f104792bc15ca6f74a129866a2445609.png)

EDIT:  
I’ve renamed and updated my file .launch and .py to be different from “move\_drone” but nothing changed.

 ![immagine](https://get-help.robotigniteacademy.com/uploads/default/original/2X/4/412dae4925dfbdfab6c8ef1b42662ba9e4bd6f2a.png)

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [December 18, 2020, 10:47am UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/19 "2020-12-18T10:47:51Z")

</div>

@umberto.severino,

What the error indicates in simple terms is that your custom action message has not been properly built (the message is built and the `action` directory is created behind the scenes after a successful `catkin_make`). There can be a number of reasons for that.

Please go through all the tips in the previous posts. It’s highly likely that the solution(s) is/are already there.

---

<div class="post-metadata">

**Author:** ![umberto.severino](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/u/ecb155/32.png) [@umberto.severino](https://get-help.theconstruct.ai/u/umberto.severino)\
**Post date:** [December 18, 2020, 11:15am UTC](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037/20 "2020-12-18T11:15:44Z")

</div>

> cmake\_minimum\_required(VERSION 3.0.2)  
> project(actions\_quiz)
> 
> ## Find catkin macros and libraries
> 
> ## if COMPONENTS list like find\_package(catkin REQUIRED COMPONENTS xyz)
> 
> ## is used, also find other catkin packages
> 
> find\_package(catkin REQUIRED COMPONENTS  
> std\_msgs  
> actionlib\_msgs  
> actionlib  
> )
> 
> ## Generate actions in the ‘action’ folder
> 
> add\_action\_files(  
> FILES  
> CustomActionMsg.action  
> )
> 
> ## Generate added messages and services with any dependencies listed here
> 
> generate\_messages(  
> DEPENDENCIES  
> actionlib\_msgs  
> std\_msgs  
> actionlib  
> )
> 
> catkin\_package(  
> CATKIN\_DEPENDS rospy actionlib\_msgs std\_msgs actionlib  
> )
> 
> ## Specify additional locations of header files
> 
> ## Your package locations should be listed before other locations
> 
> # include\_directories(include)
> 
> include\_directories(  
> ${catkin\_INCLUDE\_DIRS}  
> )

This is my CMakeList. I can also attach here the package.xml but it is correct (all the depends are set).  
If i run “rosmsg list | grep CustomActionMsg” it is all right. I really don’t know what is the problem.

[Next page](https://get-help.theconstruct.ai/t/unit-4-importerror-no-module-named-action/2037.md?page=2)
