Hi there, I have a problem.
I am running my interactive training using these 2 commands:
rasa run actions
and
rasa interactive
But when it wants to do an action from the actions.py file it gives this error:
Encountered an exception while running action ‘action_time’. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
Here is my actions.py:
from rasa_sdk import Action
from rasa_sdk.events import SlotSet
from datetime import datetime
class ActionTime(Action):
def name(self):
return 'action_time'
def run(self, dispatcher, tracker, domain):
current_time = datetime.now().strftime('%H:%M')
response = """The time is {}.""".format(current_time)
dispatcher.utter_message(response)
And here is my domain.yml:
%YAML 1.1
---
actions:
- action_time
- utter_goodbye
- utter_greet
- utter_noproblem
entities:
- location
intents:
- goodbye
- greet
- inform_time
- thank
slots:
location:
type: text
templates:
utter_goodbye:
- text: Talk to you later.
- text: Bye bye!
- text: Talk to you soon
utter_greet:
- text: Hello! How can I help?
- text: Hi there! What can I do for you?
utter_noproblem:
- text: No problem!
- text: Pleasure to help!
- text: Always a pleasure!
- text: You are welcome!
- text: Of course!
What am I doing wrong?