NameError: name 'FormAction' is not defined when running actions.py - Rasa Open Source - Rasa Community Forum
👋 Introducing the Rasa Playground
NameError: name ‘FormAction’ is not defined when running actions.py
post by sugarshock on May 24, 2020
Hi, I’m trying to implement a form action, so my actions.py looks like this:
from typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
class BeratungForm(FormAction):
def name(self) -> Text:
return "beratung_form"
[followed by some functions]
But when I try to run the actions.py in my terminal with
rasa run actions
I get a long stacktrace with the error
File "/home/sugarshock/bildungsbot-ai/actions.py", line 29, in <module>
class BeratungForm(FormAction):
NameError: name 'FormAction' is not defined
at the bottom. I couldn’t find any more recent information on how to implement the form action other than this tutorial.
Does anybody have an idea what’s the problem?
post by MuraliChandran14 on May 24, 2020
Hi @sugarshock
You forget to include from rasa_sdk.forms import FormAction in your actions.py