Failed to validate YAML but no errors are thrown - Rasa Open Source - Rasa Community Forum
👋 Introducing the Rasa Playground
Failed to validate YAML but no errors are thrown
867 views
post by Jivitesh on Jan 24, 2021
i have checked my domain.yml file online it says it is a valid file but rasa cant validate it
post by siriusraja on Jan 24, 2021
Hi @Jivitesh
Pls post your domain file content & full error message.
post by Jivitesh on Jan 24, 2021
My domain file looks like this and my error message is attached below every time i run rasa train this pops up
domain.yml (10.2 KB)
post by siriusraja on Jan 25, 2021
Hi @Jivitesh
Can you try with this one.
domain.yaml (10.7 KB)
post by Jivitesh on Jan 25, 2021
Thank you
post by siriusraja on Jan 25, 2021
hi @Jivitesh
Can you try adding a comma in the line domain: DomainDict,
post by Jivitesh on Jan 25, 2021
I tried, but it still throws the same error.
post by siriusraja on Jan 26, 2021
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 actions.py.
post by Jivitesh on Jan 26, 2021
Sure will try that and get back to you soon, thank you for all your help
post by Jivitesh on Jan 26, 2021
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}
else:
dispatcher.utter_message("Got it")
return {"cuisine": slot_value}
post by siriusraja on Jan 26, 2021
I need the list of imports you have done as well
post by Jivitesh on Jan 26, 2021
Screenshots of import below
post by siriusraja on Jan 27, 2021
Please use the below import statements
from typing import Any, Text, Dict, List, Optional, Union
from rasa_sdk import Action, Tracker
from rasa_sdk.events import SlotSet, AllSlotsReset, EventType
from rasa_sdk.executor import CollectingDispatcher
import requests
import json
import numpy as np
post by Jivitesh on Jan 28, 2021
sure will try and inform
post by Jivitesh on Jan 28, 2021
I have tried it but its still not working
post by siriusraja on Jan 28, 2021
Is it still same error ? Can you share your actions.py file.