# Rasa\_core.train unable to find custom actions.py

**URL:** <https://forum.rasa.com/t/rasa-core-train-unable-to-find-custom-actions-py/702>\
**Category:** Rasa Open Source\
**Created:** [August 27, 2018, 1:53pm UTC](https://forum.rasa.com/t/rasa-core-train-unable-to-find-custom-actions-py/702 "2018-08-27T13:53:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krogsager](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/krogsager/32/95_2.png) [@Krogsager](https://forum.rasa.com/u/Krogsager)\
**Post date:** [August 27, 2018, 1:53pm UTC](https://forum.rasa.com/t/rasa-core-train-unable-to-find-custom-actions-py/702/1 "2018-08-27T13:53:00Z")

</div>

Since friday I have been unable to train my model with any custom actions. Might this be caused by some changes to rasa\_core master since friday? I tried to download and train the [rasa-demo](https://github.com/RasaHQ/rasa-demo) and the same problem occurs.

When I run rasa\_core.train the terminal prints hundreds of lines saying

> rasa\_core.domain - Failed to use action _action name here_ in history.

This is the final error:

> Exception: Can not access action ‘custom\_act\_incident\_type’, as that name is not a registered action for this domain. Available actions are:
> 
> _…list of actions in domain_
> 
> actions.ActionIncidentType

This message is somewhat useless since the custom action named `custom_act_incident_type` is not in the domain file, but in the actions.py

```
class ActionIncidentType(Action):

    def name(self):
        return 'custom_act_incident_type'

```

---

<div class="post-metadata">

**Author:** ![Krogsager](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/krogsager/32/95_2.png) [@Krogsager](https://forum.rasa.com/u/Krogsager)\
**Post date:** [August 28, 2018, 9:18am UTC](https://forum.rasa.com/t/rasa-core-train-unable-to-find-custom-actions-py/702/2 "2018-08-28T09:18:27Z")

</div>

I’ve opend an issue for this, including a bare bones example

> <https://github.com/RasaHQ/rasa/issues/3110>
>
> \*\*Rasa Core version\*\*: 0.11.0a1, commit 89b4651f4a
> 
> \*\*Python version\*\*: 
> Pyth…on 3.6.6 |Anaconda, Inc.
> 
> \*\*Operating system\*\* (windows, osx, ...): macOS 10.13.6
> 
> \*\*Issue\*\*:
> When running rasa\_core.train my custom action is not found.
> 
> I first receive a warning:
> \`rasa\_core.domain - Failed to use action 'custom\_action\_hello' in history. Please make sure all actions are listed in the domains action list. If you recently removed an action, don't worry about this 
> warning. It should stop appearing after a while. \`
> 
> Then I receive an error:
> \`\`\`
> File "/Users/andkr/rasa/rasa\_core/rasa\_core/domain.py", line 251, in index\_for\_action
> return self.action\_names.index(action\_name)
> ValueError: 'custom\_action\_hello' is not in list
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
> File "/anaconda3/envs/rasa\_env/lib/python3.6/runpy.py", line 193, in \_run\_module\_as\_main
> "\_\_main\_\_", mod\_spec)
> File "/anaconda3/envs/rasa\_env/lib/python3.6/runpy.py", line 85, in \_run\_code
> exec(code, run\_globals)
> File "/Users/andkr/rasa/rasa\_core/rasa\_core/train.py", line 191, in \<module\>
> additional\_arguments)
> File "/Users/andkr/rasa/rasa\_core/rasa\_core/train.py", line 162, in train\_dialogue\_model
> agent.train(training\_data, \*\*kwargs)
> File "/Users/andkr/rasa/rasa\_core/rasa\_core/agent.py", line 513, in train
> \*\*kwargs)
> File "/Users/andkr/rasa/rasa\_core/rasa\_core/policies/ensemble.py", line 61, in train
> policy.train(training\_trackers, domain, \*\*kwargs)
> File "/Users/andkr/rasa/rasa\_core/rasa\_core/policies/memoization.py", line 152, in train
> self.\_add(trackers\_as\_states, trackers\_as\_actions, domain)
> File "/Users/andkr/rasa/rasa\_core/rasa\_core/policies/memoization.py", line 108, in \_add
> feature\_item = domain.index\_for\_action(action)
> File "/Users/andkr/rasa/rasa\_core/rasa\_core/domain.py", line 253, in index\_for\_action
> self.\_raise\_action\_not\_found\_exception(action\_name)
> File "/Users/andkr/rasa/rasa\_core/rasa\_core/domain.py", line 261, in \_raise\_action\_not\_found\_exception
> "Available actions are: \\n{}".format(action\_name, action\_names))
> Exception: Can not access action 'custom\_action\_hello', as that name is not a registered action for this domain. Available actions are: 
> - action\_listen
> - action\_restart
> - action\_default\_fallback
> - actions.ActionHello
> \`\`\`
> 
> \*\*Content of domain file\*\* (if used & relevant):
> \`\`\`yaml
> intents:
> \- int\_greet
> 
> actions:
> \- actions.ActionHello
> \`\`\`
> 
> \*\*Content of story file\*\*
> \`\`\`md
> \## Generated Story 708345159307012596
> \* int\_greet
> - custom\_action\_hello
> \`\`\`
> 
> \*\*Content of actions.py\*\*
> \`\`\`python
> from \_\_future\_\_ import absolute\_import
> from \_\_future\_\_ import division
> from \_\_future\_\_ import print\_function
> from \_\_future\_\_ import unicode\_literals
> 
> from rasa\_core.actions import Action
> from rasa\_core.events import SlotSet, AllSlotsReset
> 
> class ActionHello(Action):  
> def name(self):         
> return 'custom\_action\_hello' 
>     
> def run(self, dispatcher, tracker, domain):         
> dispatcher.utter\_message("HELLO from python.")
> return\[\]
> 
> \`\`\`

---

<div class="post-metadata">

**Author:** ![Krogsager](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/krogsager/32/95_2.png) [@Krogsager](https://forum.rasa.com/u/Krogsager)\
**Post date:** [August 29, 2018, 10:18am UTC](https://forum.rasa.com/t/rasa-core-train-unable-to-find-custom-actions-py/702/3 "2018-08-29T10:18:08Z")

</div>

[Problem solved](https://github.com/RasaHQ/rasa_core/issues/903#issuecomment-416857579)
