ImportError: cannot import name CustomActionMsgFeedback

Hi

I’m trying to run my quiz for the Actions Server unit. I’m facing the following import error:

ImportError: cannot import name CustomActionMsgFeedback

I had tried also to change this:
" from actions_quiz import CustomActionMsgFeedback, CustomActionMsgResult, CustomActionMsgAction "

to:

" from actions_quiz.msg import CustomActionMsgFeedback, CustomActionMsgResult, CustomActionMsgAction "

but then, I get ImportError: No module named msg

I had followed all steps for creating custom actions, and I don’t know what is wrong. You can check all my code in this gist:

Thank you very much in advanced.

Hi @jesus.perezmartinez,

Thank you for contacting us and welcome to the Community!

Please make the following corrections (if necessary and try again):

  1. Your action message name is named CustomActionMsg.launch. It should be CustomActionMsg.action. Also ensure that this file is inside a subdirectory named action, in your actions_quiz package directory.

  2. The import line should read from actions_quiz.msg .... You cannot import directly from actions_quiz.

  3. Follow this guide to ensure the message is properly compiled: ERROR: Cannot load message class for [package/Message]. Are your messages built?