AttributeError: 'NoneType' object has no attribute 'setdefault' in rasa

  • Rasa Version : 2.0.2
  • Rasa SDK Version : 2.1.2
  • Rasa X Version : 0.33.2
  • Python Version : 3.7.0
  • Operating System :
  • Linux-5.4.0-53-generic-x86_64-with-debian-bullseye-sid

AttributeError: ‘NoneType’ object has no attribute ‘setdefault’ in rasa i am getting this error while training ?? anyone able to help me, thanks in advance…

hi @prakashr - can you please share a minimal example that causes this error? does it happen with the moodbot (which you create with rasa init ? )

While training and the problem resolved by installing the rasa again… thank you for the reply… @amn41

Please note that this generic error message can be cause due to missing/incorrect indent as well.

For example in the domain.yml file if you code

  • affirm:
    use_entities: true

and miss adding the indent in the line 2 then during rasa train one will get similar error message.

So please check your updated files for such errors, to spot the cause.

yah this helped, we need to mention those in domain.yml

thanks

Faced two times, first it was indent issue in one of the .yml file.

second,

in domain.yml

under intents

  • EXTERNAL_reorder_callback:

i was using this, so i changed it to

  • EXTERNAL_reorder_callback: use_entities: true

and it worked

I tried this and this works too, thanks