Getting attribute error on running rasa train command.
I think there is some problem in slot declaration. Please post your domain file. Also, are you using custom slot? If so, please post that file as well.
slots:
id:
type:text
initail_value:"xyz"
This is how I declared slots under intents in domain file and here is the code of custom actions.py:
from typing import Any, Text, Dict, List, Union, Optional
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
from rasa_sdk.events import SlotSet
from dbConnect import getData
class ActionCheckClients(Action):
def name(self) -> Text:
return âaction_check_clientsâ
def run(self, dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
client = tracker.get_slot(âidâ)
query=âselect * from client where client_id=â{0}â limit 1â.format(client)
data = getData(query)
print("data: ",data)
dispatcher.utter_message(text=âHere are the information you asked forâ,json_message=data)
return[]
Hey @Prskriti, there were some problems like indentation and spelling mistake for initial value, try this:
slots:
id:
type: text
initial_value: "xyz"
âdeclared slots under intentsâ?
As @JiteshGaikwad said, there is a spelling mistake (initail_value
). Please try declaring slots as he has mentioned in his answer. Also, (just incase ) slots are not declared under intents. See this example domain file.
Yeah my bad I didnât realize I did such a silly spelling mistake.
Anyways thanks for ur help.
Sry my bad I did such a silly mistake.
Thanks for your help.
Nope after intents I declared slot value.
Oh, okay, hope that solved your problem.
Yep It did thanks