AttributeError: 'NoneType' object has no attribute 'get' in latest RASA Version
See original GitHub issueRasa version: rasa_core==0.14.5
Rasa X version (if used & relevant):
Python version: 3.6.1
Operating system (windows, osx, …): Windows 10
Issue:
Does not have the get module in slot class
Error (including full traceback):
Traceback (most recent call last):
File "train_init.py", line 18, in <module>
agent = Agent('weather_domain.yml', policies = [MemoizationPolicy(), KerasPolicy()])
File "C:\Users\aritra.chatterjee\AppData\Local\Programs\Python\Python36\envs\chatbot\lib\site-packages\rasa_core\agent.py", line 218, in __init__
self.domain = self._create_domain(domain)
File "C:\Users\aritra.chatterjee\AppData\Local\Programs\Python\Python36\envs\chatbot\lib\site-packages\rasa_core\agent.py", line 669, in _create_domain
return Domain.load(domain)
File "C:\Users\aritra.chatterjee\AppData\Local\Programs\Python\Python36\envs\chatbot\lib\site-packages\rasa_core\domain.py", line 122, in load
return cls.from_yaml(read_file(filename))
File "C:\Users\aritra.chatterjee\AppData\Local\Programs\Python\Python36\envs\chatbot\lib\site-packages\rasa_core\domain.py", line 128, in from_yaml
return cls.from_dict(data)
File "C:\Users\aritra.chatterjee\AppData\Local\Programs\Python\Python36\envs\chatbot\lib\site-packages\rasa_core\domain.py", line 133, in from_dict
slots = cls.collect_slots(data.get("slots", {}))
File "C:\Users\aritra.chatterjee\AppData\Local\Programs\Python\Python36\envs\chatbot\lib\site-packages\rasa_core\domain.py", line 221, in collect_slots
slot_class = Slot.resolve_by_type(slot_dict[slot_name].get("type"))
AttributeError: 'NoneType' object has no attribute 'get'
Command or request that led to error:
python train_init.py
Content of configuration file (config.yml) (if relevant):
Content of domain file (domain.yml) (if relevant):
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
AttributeError: 'NoneType' object has no attribute 'get' on rasa ...
In your case slot_dict[slot_name] is None . Make sure it is not None but some object. Here is the same error in a...
Read more >Rasa-x 1.0.1 compatibility issue with Rasa 2.8.2 & 2.8.17 models
I am using Ubuntu 20 and following the most recent install guidelines for ... AttributeError: 'NoneType' object has no attribute 'version' ...
Read more >Debugging Rasa Errors - DEV Community
AttributeError : 'bool' object has no attribute 'get' ... What I've done: I utilize past code a lot, and VSCode likes to automatically...
Read more >From zero to hero: Creating a chatbot with Rasa NLU and ...
Full code of this tutorial [Latest release of Rasa NLU and Rasa Core] ... AttributeError: 'NoneType' object has no attribute 'startswith'.
Read more >rasa-nlu - PyPI
Current github master version does NOT support python 2.7 anymore (neither will the next major release). If you want to use Rasa NLU...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tabergma :
Thank you for the update.
I was doing something wrong with the yml template (space and indent issue; thats why it was none type when it was passed to slot in domain.py from rasa_core) and stories.md. As i corrected the yml format and used the appropriate stories.md. The issue resolved and now it is working.
Closing the ticket
Hi @richie312! Did you consider updating to Rasa 1.0 and use the updated code here: https://github.com/JustinaPetr/Weatherbot_Tutorial/tree/master/Full_Code_Latest?
We are not maintaining the older Rasa versions anymore. So, we will not fix the issue. Feel free to fix it yourself. Otherwise, I would highly recommend to switch to Rasa 1.0.