Value 'None' is not a dict. Value path: '/slots'

can you explain why i’m getting this error. what wrong in first line which is “version: 2.0” ??

1 Like

Hello @sharsh

What does your slots section for your domain.yml look like? Note that None in Python is null in yaml.

domain.yml (3.6 KB) stories.yml (1.8 KB) nlu.yml (24.5 KB)

Hi @j.mosig I’m attaching those file, can you check and please let me know, as here I’m unable to figure it out.

Thanks

actions.py (2.9 KB)

Please, first try to copy paste your files here and see if the yaml is valid: http://www.yamllint.com/

hi @j.mosig yes it shows valid, I checked already.

what if you remove these lines:

slots:
feedback:

? If that’s it, then this may be a small bug in the Rasa validation code.

@j.mosig no isn’t the one. could i send u whole code. can you try to run in your system in rasa 2.x version and evaluate? I’m pissed with this bug and was checking in the whole weekend still unable to find it out why this error has came.!

Sorry, I can’t do the debugging for you. But I just had another look at the domain.yml and it seems the spacing is not correct. For example,

slots:
feedback:
type: unfeaturized
auto_fill: false
firstN:
  type: unfeaturized
  auto_fill: false
lastN:
  type: unfeaturized
  auto_fill: false

should be

slots:
  feedback:
    type: unfeaturized
    auto_fill: false
  firstN:
    type: unfeaturized
    auto_fill: false
  lastN:
    type: unfeaturized
    auto_fill: false

YAML is extremely sensitive to whitespaces. Even when it is generally valid, the hierarchy of items depends on it and when the spacing is wrong Rasa won’t accept it.

1 Like

Hey guys i am getting a similar error to this but i dont know what is it here are my nlu , domain , stories files NLU:

  • intent: greet examples: |

    • hey
    • hello
    • hi
    • hello there
    • good morning
    • good evening
    • moin
    • hey there
    • let’s go
    • hey dude
    • goodmorning
    • goodevening
    • good afternoon
  • intent: goodbye examples: |

    • good afternoon
    • cu
    • good by
    • cee you later
    • good night
    • bye
    • goodbye
    • have a nice day
    • see you around
    • bye bye
    • see you later
  • intent: affirm examples: |

    • yes
    • y
    • indeed
    • of course
    • that sounds good
    • correct
  • intent: deny examples: |

    • no
    • n
    • never
    • I don’t think so
    • don’t like that
    • no way
    • not really
  • intent: mood_great examples: |

    • perfect
    • great
    • amazing
    • feeling like a king
    • wonderful
    • I am feeling very good
    • I am great
    • I am amazing
    • I am going to save the world
    • super stoked
    • extremely good
    • so so perfect
    • so good
    • so perfect
  • intent: mood_unhappy examples: |

    • my day was horrible
    • I am sad
    • I don’t feel very well
    • I am disappointed
    • super sad
    • I’m so sad
    • sad
    • very sad
    • unhappy
    • not good
    • not very good
    • extremly sad
    • so sad
    • so sad
  • intent: bot_challenge examples: |

    • are you a bot?
    • are you a human?
    • am I talking to a bot?
    • am I talking to a human?
  • intent: time_table_query examples:

    • What is tommorows time table?
    • At what time is the math period? Domain file: version: “2.0”

intents:

  • greet
  • goodbye
  • affirm
  • deny
  • mood_great
  • mood_unhappy
  • bot_challenge
  • time_table_query

responses: utter_greet:

  • text: “Hey! How are you?”

utter_cheer_up:

utter_did_that_help:

  • text: “Did that help you?”

utter_happy:

  • text: “Great, carry on!”

utter_goodbye:

  • text: “Bye”

utter_iamabot:

  • text: “I am a bot, powered by Rasa.”

session_config: session_expiration_time: 60 carry_over_slots_to_new_session: true Stories: version: “2.0”

stories:

  • story: happy path steps:

    • intent: greet
    • action: utter_greet
    • intent: mood_great
    • action: utter_happy
  • story: sad path 1 steps:

    • intent: greet
    • action: utter_greet
    • intent: mood_unhappy
    • action: utter_cheer_up
    • action: utter_did_that_help
    • intent: affirm
    • action: utter_happy
  • story: sad path 2 steps:

    • intent: greet
    • action: utter_greet
    • intent: mood_unhappy
    • action: utter_cheer_up
    • action: utter_did_that_help
    • intent: deny
    • action: utter_goodbye
  • story: time_table steps:

    • intent: time_table_query
    • action: deny error : The configuration for pipeline and policies was chosen automatically. It was written into the config file at ‘config.yml’. YamlValidationException: Failed to validate ‘data\nlu.yml’. Please make sure the file is correct and all mandatory parameters are specified. Here are the errors found during validation: in data\nlu.yml:96: Value ‘[‘What is tommorows time table’, ‘At what time is the math period’, None]’ is not of type ‘str’. Path: ‘/nlu/7/examples’ in data\nlu.yml:96: Value ‘What is tommorows time table’ is not a dict. Value path: ‘/nlu/7/examples/0’ in data\nlu.yml:96: Value ‘At what time is the math period’ is not a dict. Value path: ‘/nlu/7/examples/1’ in data\nlu.yml:96: Value ‘None’ is not a dict. Value path: ‘/nlu/7/examples/2’ in data\nlu.yml:94: Key ‘intent’ was not defined. Path: ‘/nlu/7’

hey @SyedBilalHasan Please check the Solution comments Marked in this chat. Make sure about the whitespace in YAML.

1 Like

Hey @sharsh I checked the solution comments and also Checked the whitespace in YAML but there seems to be no error would you not mind pointing the error out since i did not see it?

Man! it’s mentioned Clearly in the error.

for this error : “Please make sure the file is correct and all mandatory parameters are specified. Here are the errors found during validation: in data\nlu.yml:96: Value ‘[‘What is tommorows time table’, ‘At what time is the math period’, None]’ is not of type ‘str’. Path: ‘/nlu/7/examples’ in data\nlu.yml:96: Value ‘What is tommorows time table’ is not a dict. Value path: ‘/nlu/7/examples/0’ in data\nlu.yml:96: Value ‘At what time is the math period’ is not a dict. Value path: ‘/nlu/7/examples/1’ in data\nlu.yml:96: Value ‘None’ is not a dict. Value path: ‘/nlu/7/examples/2’ in data\nlu.yml:94: Key ‘intent’ was not defined. Path: ‘/nlu/7’” ------>

@SyedBilalHasan please check how you mentioned intents as per others intents. you missed " | " in the last intent which is "time_table_query ".