# No module named my\_custom\_srv\_msg\_pkg.srv how to resolve this error?

**URL:** <https://get-help.theconstruct.ai/t/no-module-named-my-custom-srv-msg-pkg-srv-how-to-resolve-this-error/262>\
**Category:** ROS Basics In 5 Days (Python)\
**Created:** [August 6, 2019, 2:00pm UTC](https://get-help.theconstruct.ai/t/no-module-named-my-custom-srv-msg-pkg-srv-how-to-resolve-this-error/262 "2019-08-06T14:00:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![miryalkar.ashish1234](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/miryalkar.ashish1234/32/6967_2.png) [@miryalkar.ashish1234](https://get-help.theconstruct.ai/u/miryalkar.ashish1234)\
**Post date:** [August 6, 2019, 2:00pm UTC](https://get-help.theconstruct.ai/t/no-module-named-my-custom-srv-msg-pkg-srv-how-to-resolve-this-error/262/1 "2019-08-06T14:00:34Z")

</div>

i’ve created a srv file called MyCustomServiceMessage.srv in srv folder of my\_custom\_srv\_msg\_pkg package.  
i didn’t get any error during execution of source devel/setup.bash and catkin\_make steps.  
can you please tell me what’s going wrong with my code when i tried to import the above srv from the line  
from my\_custom\_srv\_msg\_pkg.srv import MyCustomServiceMessage,  
MyCustomServiceMessageResponse.  
I also tried deleting the build folder from catkin\_ws and rebuilding it.  
still its not working.

---

<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:** [August 6, 2019, 7:00pm UTC](https://get-help.theconstruct.ai/t/no-module-named-my-custom-srv-msg-pkg-srv-how-to-resolve-this-error/262/2 "2019-08-06T19:00:46Z")

</div>

@miryalkar.ashish1234,

Just like [your other question](https://get-help.robotigniteacademy.com/t/services-quiz-in-ros-in-5-days/264/3), I think it should be something in the message creation process, as mentioned in the post below:

> **[ERROR: Cannot load message class for \[package/Message\]. Are your messages built?](https://get-help.theconstruct.ai/t/error-cannot-load-message-class-for-package-message-are-your-messages-built/55)**
>
> This error usually happens when you create a custom ROS message. SOLUTION: Please check the following in order. Painfully 🙂, #3 is a common and repeated cause, and it tends to happen even if you already know about it! Have you made the...

---

<div class="post-metadata">

**Author:** ![miryalkar.ashish1234](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/miryalkar.ashish1234/32/6967_2.png) [@miryalkar.ashish1234](https://get-help.theconstruct.ai/u/miryalkar.ashish1234)\
**Post date:** [August 7, 2019, 7:39am UTC](https://get-help.theconstruct.ai/t/no-module-named-my-custom-srv-msg-pkg-srv-how-to-resolve-this-error/262/3 "2019-08-07T07:39:39Z")

</div>

I also tried br creating a new package, but still not able to resolve it, can you please look into my code and let me know where i’m going wrong?  
Its been very long and I tried everyting i can, but cant figure what the actual problem is.  
Thanks!!

---

<div class="post-metadata">

**Author:** ![miryalkar.ashish1234](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/miryalkar.ashish1234/32/6967_2.png) [@miryalkar.ashish1234](https://get-help.theconstruct.ai/u/miryalkar.ashish1234)\
**Post date:** [August 9, 2019, 3:15pm UTC](https://get-help.theconstruct.ai/t/no-module-named-my-custom-srv-msg-pkg-srv-how-to-resolve-this-error/262/4 "2019-08-09T15:15:21Z")

</div>

After typing source devel/setup.bash in every shell errors got resolved.  
Thanks.
