Failed to validate YAML but no errors are thrown

i have checked my domain.yml file online it says it is a valid file but rasa cant validate it

Hi @Jivitesh

Pls post your domain file content & full error message.

My domain file looks like this and my error message is attached below everytime i run rasa train this pops up :frowning:

domain.yml (10.2 KB)

Hi @Jivitesh

Can you try with this one.

domain.yaml (10.7 KB)

Thank you

hi @Jivitesh

Can you try adding a comma in the line domain: DomainDict,

I tried, but it still throws the same error

Hi @Jivitesh

Just noticed the actual error message. Try replacing the line as below

domain: Dict[Text, Any],

If its still not working, Share the full content of

Sure will try that and get back to you soon, thank you for all your help

still the same error , code is attached below for inspection

class ValidateInputForm(FormValidationAction): def name(self) -> Text: return “validate_meal_information_form”

def validate_cuisine_type(self,
    value: Text,
    slot_value: Any,
    dispatcher: CollectingDispatcher,
    tracker: Tracker,
    domain: Dict[Text, Any],
) -> Dict[Text, Any]:

    # validate if kilo has 2 digits
     if slot_value not in ["American","Asian","British","Caribbean","Chinese","French","Indian","Italian","Japanese","Mediterranean","Mexican","Middle Eastern","South American","South East Asian"]:
         dispatcher.utter_message("Please enter cuisine value beginning with an Uppercase letter" )
         return {"cuisine_type": None}
         dispatcher.utter_message("Got it")
         return {"cuisine": slot_value}

I need the list of imports you have done as well

Screenshots of import below


Hi @Jivitesh

Please use the below import statements

from typing import Any, Text, Dict, List, Optional, Union
from rasa_sdk import Action, Tracker
from import SlotSet, AllSlotsReset, EventType
from rasa_sdk.executor import CollectingDispatcher

from rasa_sdk.forms import FormAction, REQUESTED_SLOT, FormValidationAction

import requests
import json
import numpy as np 

I have removed few duplicates and corrected the package name for FormValidationAction.

sure will try and inform

I have tried it but its still not working :frowning:

Is it still same error ? Can you share your file.