I’ve been struggling with an error that seems to be more than meets the eye (that is, not really described by the “Warning” and the “Warning” in this case is effectively an error). It has this message for every slot and entity:
/rasa/shared/utils/io.py:99: UserWarning: Slot ‘name’ uses a ‘from_entity’ mapping for a non-existent entity ‘name’. Skipping slot extraction because of invalid mapping.
Of course, it’s not literally true:
From domain.yml:
slots:
name:
type: text
initial_value: null
mappings:
- type: from_entity
entity: name
From nlu.yml:
- intent: provide_name
examples: |
- My name is [John Doe](name)
- You can call me [Sara](name)
- [James](name) is my name
- they call me [Biggie Smallz](name)
- [Yun Fan](name)
I have also tried several variations and tried appending an entity list to nlu.yml:
entities:
- name
My original slots
syntax was more concise.
slots:
name:
type: text
mappings:
- type: from_entity
entity: name
I’ve tried running with debug = True
, log_level: DEBUG
, -vv
, Python versions 3.7, 3.8, 3.9, and 3.10, as well as deleting caches. I’ve tried running with debug = True
, log_level: DEBUG
, -vv
, Python versions 3.7, 3.8, 3.9, and 3.10, as well as deleting caches. The model builds without error using rasa train
. In fact, if I build the nlu
component only with rasa train nlu
I can run it and see that entity extraction works fine.
Additionally, when I put a debugger in the source code I see the domain_slots.items()
look like this:
(‘name’, {‘type’: ‘text’, ‘initial_value’: None, ‘mappings’: [{‘type’: ‘from_entity’, ‘entity’: ‘name’}]}),