Rasa version: Rasa 1.7.0
Rasa SDK version (if used & relevant):
Rasa X version (if used & relevant):
Python version: 3.6.8
Operating system (windows, osx, ...): OSX
Issue:
Mapping an action to an intent using triggers attribute causes rasa train to fail.
Error (including full traceback):
Traceback (most recent call last):
File "/Users/vivek/opt/anaconda3/envs/py36/bin/rasa", line 8, in <module>
sys.exit(main())
File "/Users/vivek/opt/anaconda3/envs/py36/lib/python3.6/site-packages/rasa/__main__.py", line 76, in main
cmdline_arguments.func(cmdline_arguments)
File "/Users/vivek/opt/anaconda3/envs/py36/lib/python3.6/site-packages/rasa/cli/train.py", line 76, in train
additional_arguments=extract_additional_arguments(args),
File "/Users/vivek/opt/anaconda3/envs/py36/lib/python3.6/site-packages/rasa/train.py", line 50, in train
additional_arguments=additional_arguments,
File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
File "/Users/vivek/opt/anaconda3/envs/py36/lib/python3.6/site-packages/rasa/train.py", line 88, in train_async
domain = await file_importer.get_domain()
File "/Users/vivek/opt/anaconda3/envs/py36/lib/python3.6/site-packages/rasa/importers/importer.py", line 242, in get_domain
domains = await asyncio.gather(*domains)
File "/Users/vivek/opt/anaconda3/envs/py36/lib/python3.6/site-packages/rasa/importers/rasa.py", line 66, in get_domain
domain = Domain.load(self._domain_path)
File "/Users/vivek/opt/anaconda3/envs/py36/lib/python3.6/site-packages/rasa/core/domain.py", line 97, in load
other = cls.from_path(path)
File "/Users/vivek/opt/anaconda3/envs/py36/lib/python3.6/site-packages/rasa/core/domain.py", line 107, in from_path
domain = cls.from_file(path)
File "/Users/vivek/opt/anaconda3/envs/py36/lib/python3.6/site-packages/rasa/core/domain.py", line 120, in from_file
return cls.from_yaml(rasa.utils.io.read_file(path))
File "/Users/vivek/opt/anaconda3/envs/py36/lib/python3.6/site-packages/rasa/core/domain.py", line 130, in from_yaml
return cls.from_dict(data)
File "/Users/vivek/opt/anaconda3/envs/py36/lib/python3.6/site-packages/rasa/core/domain.py", line 159, in from_dict
**additional_arguments,
File "/Users/vivek/opt/anaconda3/envs/py36/lib/python3.6/site-packages/rasa/core/domain.py", line 349, in __init__
self.intent_properties = self.collect_intent_properties(intents)
File "/Users/vivek/opt/anaconda3/envs/py36/lib/python3.6/site-packages/rasa/core/domain.py", line 276, in collect_intent_properties
properties.setdefault("use_entities", True)
AttributeError: 'NoneType' object has no attribute 'setdefault'
Command or request that led to error:
rasa train
Content of configuration file (config.yml) (if relevant):
# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
language: en
pipeline:
- name: WhitespaceTokenizer
case_sensitive: false
- name: RegexFeaturizer
- name: CRFEntityExtractor
- name: EntitySynonymMapper
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
- name: EmbeddingIntentClassifier
policies:
- name: MemoizationPolicy
- name: FormPolicy
- name: MappingPolicy
Content of domain file (domain.yml) (if relevant):
intents:
- greet
- goodbye
- affirm
- deny
- mood_great
- mood_unhappy
- out_of_scope:
triggers: action_outofscope
esponses:
utter_greet:
- text: Hey! How are you?
utter_cheer_up:
- text: 'Here is something to cheer you up:'
image: https://i.imgur.com/nGF1K8f.jpg
utter_did_that_help:
- text: Did that help you?
utter_happy:
- text: Great, carry on!
utter_goodbye:
- text: Bye
utter_outofscope:
- text: Sorry, I can’t handle that request.
actions:
- utter_greet
- utter_cheer_up
- utter_did_that_help
- utter_happy
- utter_goodbye
- action_outofscope
- utter_outofscope
Removing triggers: action_outofscope from the domain file doesn't raise the error.
I think you are missing an indent:
intents:
- greet
- goodbye
- affirm
- deny
- mood_great
- mood_unhappy
- out_of_scope:
triggers: action_outofscope
esponses:
utter_greet:
- text: Hey! How are you?
utter_cheer_up:
- text: 'Here is something to cheer you up:'
image: https://i.imgur.com/nGF1K8f.jpg
utter_did_that_help:
- text: Did that help you?
utter_happy:
- text: Great, carry on!
utter_goodbye:
- text: Bye
utter_outofscope:
- text: Sorry, I can’t handle that request.
actions:
- utter_greet
- utter_cheer_up
- utter_did_that_help
- utter_happy
- utter_goodbye
- action_outofscope
- utter_outofscope
Does it work with this domain file?
triggers must be indent
@shixx299 I'm going to close the issue as it is not a bug. Glad it works now 😄
Had the same issue. Thank you so much @tabergma
@tabergma I had the same issue, Thank you for helpng!!
Most helpful comment
triggers: action_outofscope
triggers must be indent