Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erro when specifying "null" entities in stories #8300

Closed
humcasma opened this issue Mar 25, 2021 · 1 comment · Fixed by #8516
Closed

Erro when specifying "null" entities in stories #8300

humcasma opened this issue Mar 25, 2021 · 1 comment · Fixed by #8516
Assignees
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/training-data Issues focused around Rasa training data (stories, NLU, domain, etc.) effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@humcasma
Copy link

Rasa version: 2.4.2

Rasa SDK version 2.4.1

Python version: 3.7.10

Operating system (windows, osx, ...): Linux-4.19.112+-x86_64-with-Ubuntu-18.04-bionic

Issue:
Rasa crashes when a story contains a "null" entity. That story would be used to handle the case where an intent is identified but an expected entity is not provided.

- story: test
  steps:
  - intent: test_intent
    entities:
    - test_entity: null
  - action: test_action

Error (including full traceback):

 File "/content/rasa/bin/rasa", line 8, in <module>
    sys.exit(main())
  File "/content/rasa/lib/python3.7/site-packages/rasa/__main__.py", line 116, in main
    cmdline_arguments.func(cmdline_arguments)
  File "/content/rasa/lib/python3.7/site-packages/rasa/cli/train.py", line 58, in <lambda>
    train_parser.set_defaults(func=lambda args: train(args, can_exit=True))
  File "/content/rasa/lib/python3.7/site-packages/rasa/cli/train.py", line 102, in train
    finetuning_epoch_fraction=args.epoch_fraction,
  File "/content/rasa/lib/python3.7/site-packages/rasa/train.py", line 109, in train
    loop,
  File "/content/rasa/lib/python3.7/site-packages/rasa/utils/common.py", line 307, in run_in_loop
    result = loop.run_until_complete(f)
  File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
  File "/content/rasa/lib/python3.7/site-packages/rasa/train.py", line 174, in train_async
    finetuning_epoch_fraction=finetuning_epoch_fraction,
  File "/content/rasa/lib/python3.7/site-packages/rasa/train.py", line 271, in _train_async_internal
    new_fingerprint = await model.model_fingerprint(file_importer)
  File "/content/rasa/lib/python3.7/site-packages/rasa/model.py", line 343, in model_fingerprint
    FINGERPRINT_STORIES_KEY: stories.fingerprint(),
  File "/content/rasa/lib/python3.7/site-packages/rasa/shared/core/training_data/structures.py", line 414, in fingerprint
    stories_as_yaml = YAMLStoryWriter().stories_to_yaml(self.story_steps)
  File "/content/rasa/lib/python3.7/site-packages/rasa/shared/core/training_data/story_writer/yaml_story_writer.py", line 119, in stories_to_yaml
    stories.append(self.process_story_step(story_step))
  File "/content/rasa/lib/python3.7/site-packages/rasa/shared/core/training_data/story_writer/yaml_story_writer.py", line 149, in process_story_step
    processed = self.process_event(event)
  File "/content/rasa/lib/python3.7/site-packages/rasa/shared/core/training_data/story_writer/yaml_story_writer.py", line 163, in process_event
    return self.process_user_utterance(event, self._is_test_story)
  File "/content/rasa/lib/python3.7/site-packages/rasa/shared/core/training_data/story_writer/yaml_story_writer.py", line 230, in process_user_utterance
    if entity["value"]:
KeyError: 'value'

Command or request that led to error:

rasa train
@humcasma humcasma added area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. labels Mar 25, 2021
@sara-tagger
Copy link
Collaborator

Thanks for the issue, @dakshvar22 will get back to you about it soon!

You may find help in the docs and the forum, too 🤗

@TyDunn TyDunn added the area:rasa-oss/training-data Issues focused around Rasa training data (stories, NLU, domain, etc.) label Apr 16, 2021
@joejuzl joejuzl added the effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. label Apr 16, 2021
@alwx alwx self-assigned this Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/training-data Issues focused around Rasa training data (stories, NLU, domain, etc.) effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants