Rasa: StoryParseError: Unkown event

Created on 20 Feb 2018  路  4Comments  路  Source: RasaHQ/rasa

Rasa Core version:
0.8.2
Python version:
3.5
Operating system (windows, osx, ...):
Win7 Enterprise
Issue:
Core Training throws error.

(virtenv64bit35) PS ...\RASA> ._train_core.ps1
...\virtenv64bit35\lib\site-packages\h5py__init__.py:36: FutureWarning: Conversion of ...
Using TensorFlow backend.
2018-02-20 13:07:15 ERROR rasa_core.training.dsl - Error in line 3: Unknown event 'MyModule.ActionMoveTo'. It is Neither an event nor an action).
Traceback (most recent call last):
File "...\virtenv64bit35\lib\site-packages\rasa_core\training\dsl.py", line 209, in process_lines
self.add_event(event_name, parameters)
File "....\virtenv64bit35\lib\site-packages\rasa_core\training\dsl.py", line 295, in add_event
"nor an action).".format(event_name))
rasa_core.training.dsl.StoryParseError: Unknown event 'MyModule.ActionMoveTo'. It is Neither an event nor an action).
2018-02-20 13:07:15 ERROR rasa_core.training.dsl - Failed to parse '....\data\stories.md'

Content of domain file

intents:
  - command_move_to

actions:
  - MyModule.ActionMoveTo

slots:
    success:
        type: bool

Content of stories file

## move_to_path
* command_move_to
- MyModule.ActionMoveTo  {"success": "True"}

Content of MyModule

from rasa_core.actions import Action
from rasa_core.events import SlotSet

class ActionMoveTo(Action):
   def name(self):
      # type: () -> Text
      return "ActionMoveTo"

   def run(self, dispatcher, tracker, domain):
      # type: (Dispatcher, DialogueStateTracker, Domain) -> List[Event]

      success = False

      return [SlotSet("success", success)]

Called this
-python -m rasa_core.train -s myfolder/data/stories.md -d myfolder/domain.yml -o myfolder/models/dialogue --epochs 100
within the folder which contains MyModule.py

https://core.rasa.ai/0.8.2/domains.html is my reference

All 4 comments

I assume MyModule.py is found and imported.
(When I delete the occurence in stories.md the training finishes as expected, When I rename MyModule.py it explicitly states that it has not been found.)
Which step do I miss?

in your story, please try this:

* command_move_to
- ActionMoveTo

in your domain.yml you need the module path, but in the stories just the action's name

Thanks for your quick response.
Probably that's an obvious thing to try out but I searched the problem elsewhere.
Might add short sentence to:
https://core.rasa.ai/0.8.2/domains.html#putting-it-all-together

Edit:
Well, someone already commited the proposed changes.
f9d43edec8c13d1e3168e27e5a0744bd5060d65c

Now I found a similar issue #221

How is it possible that the search "unkown event" didn't show me this issue?

Was this page helpful?
0 / 5 - 0 ratings