Hi. I am trying to run rasa train
but I’m getting an error:
UserWarning: Issue found in 'data/rules/rules_common.yml':
Found intent 'intent_common_greet' in stories which is not part of the domain.
The problem is that the intent is in the domain file.
But I separated the domain file in many other files. Training, validating and using the model works normally. But testing doesn’t. My files are structured like this:
src/
┣ actions/
┣ data/
┃ ┣ nlu/
┃ ┃ ┣ common/
┃ ┃ ┃ ┗ nlu_common.yml
┃ ┣ rules/
┃ ┃ ┗ rules_common.yml
┃ ┗ stories/
┃ ┗ stories_common.yml
┣ domain/
┃ ┗ domain_common.yml
┣ models/
┃ ┗ model.tar.gz
┣ tests/
┃ ┗ stories/
┃ ┗ test_stories.yml
┣ config.yml
┣ credentials.yml
┣ endpoints.yml
┗ environments.yml
I don’t have only one file for each folder. In rules folder I have for example rules_topic1.yml
, rules_topic2.yml
, etc. The same in the domain, nlu, etc.
Also there is this stack trace:
Traceback (most recent call last):
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/core/training_data/loading.py", line 113, in load_data_from_files
steps = reader.read_from_file(story_file)
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/core/training_data/story_reader/yaml_story_reader.py", line 99, in read_from_file
return self.read_from_string(
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/core/training_data/story_reader/yaml_story_reader.py", line 127, in read_from_string
return self.read_from_parsed_yaml(yaml_content)
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/core/training_data/story_reader/yaml_story_reader.py", line 152, in read_from_parsed_yaml
parser.parse_data(data)
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/core/training_data/story_reader/yaml_story_reader.py", line 220, in parse_data
self._parse_plain_item(item)
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/core/training_data/story_reader/yaml_story_reader.py", line 250, in _parse_plain_item
self._parse_step(step)
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/core/training_data/story_reader/yaml_story_reader.py", line 283, in _parse_step
self._parse_slot(step)
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/core/training_data/story_reader/yaml_story_reader.py", line 470, in _parse_slot
SlotSet.type_name, {slot: self._slot_default_value(slot)}
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/core/training_data/story_reader/yaml_story_reader.py", line 491, in _slot_default_value
slot = next(slot for slot in self.domain.slots if slot.name == slot_name)
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/filipe/.local/bin/rasa", line 8, in <module>
sys.exit(main())
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/__main__.py", line 117, in main
cmdline_arguments.func(cmdline_arguments)
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/cli/test.py", line 237, in test
run_nlu_test(args)
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/cli/test.py", line 218, in run_nlu_test
rasa.utils.common.run_in_loop(
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/utils/common.py", line 296, in run_in_loop
result = loop.run_until_complete(f)
File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/cli/test.py", line 163, in run_nlu_test_async
nlu_data = await test_data_importer.get_nlu_data()
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/utils/common.py", line 141, in decorated
return await cache.cached_result()
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/importers/importer.py", line 507, in get_nlu_data
training_datasets += await asyncio.gather(
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/importers/importer.py", line 517, in _additional_training_data_from_stories
stories = await self.get_stories()
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/importers/importer.py", line 490, in get_stories
return await self.importer.get_stories(
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/importers/importer.py", line 399, in get_stories
return await self._importer.get_stories(
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/utils/common.py", line 141, in decorated
return await cache.cached_result()
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/importers/importer.py", line 272, in get_stories
stories = await asyncio.gather(*stories)
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/importers/rasa.py", line 53, in get_stories
return await utils.story_graph_from_paths(
File "/home/filipe/.local/lib/python3.8/site-packages/rasa/shared/importers/utils.py", line 25, in story_graph_from_paths
story_steps = await loading.load_data_from_files(
RuntimeError: coroutine raised StopIteration
Am I doing something wrong?