Having issue in rasa rasa_sdk files,

Hi! I am using rasa 1.10.10 I am unable to find the solution for a problem which i faced whenever i hit the run command. It stated that: ImportError: cannot import name ‘FormValidationAction’ from ‘rasa_sdk’ (/app/rasa_sdk/init.py) i have already write the code in actions.py file as: from rasa_sdk import FormValidationAction And secondly my docker container is always restarting on rotation bases, at once it shows me to run properly and in second instance it shows me it is restarting again… Here it shows me everything is all right

and here it shows me my container is on restarting

here is the code import datetime from typing import Any, Text, Dict, List

from rasa_sdk import Action, Tracker from rasa_sdk import FormValidationAction from rasa_sdk.events import ReminderScheduled, ReminderCancelled from rasa_sdk.executor import CollectingDispatcher from rasa_sdk.types import DomainDict

class validateNameForm(FormValidationAction):

def name(self) -> Text:
    return "validate_name_form"

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

    print(f"name given = {slot_value} length = {len(slot_value)}")
    if leh(slot_value) <=2:
        dispatcher.utter_message(text=f"Thats a very short name. I am assuming you mis-spelled.")
        return {"name": none}
    else:
        return {"name": slot_value}

I really don’t know why but this same things also happens with me I am still not get any solution.

There was no FormValidatationAction in 1.x. You should upgrade to 3.x

Validating slots in forms for 1.x is discussed here.

Thank you soo much stephens sir, I will look into the solution and will let you know.