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 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'
I’ve opend an issue for this, including a bare bones example
opened 08:58AM - 28 Aug 18 UTC
closed 01:41PM - 21 Mar 19 UTC
**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[]
```