Unable to import FormAction from rasa_sdk.forms in version 3.6.13

I’m working on upgrading our Rasa environment from 2.8 to 3.6.13. I’ve reached a point where we are getting an import failure when starting the bot, specifically:

File /home/user1/bot1/action.py, line 1, in module
  from rasa_sdk.forms import FormAction
ImportError: cannot import name 'FormAction' from 'rasa_sdk.forms' (/home/user1/anaconda/envs/rasa_bot/lib/python3.10/site-packages/rasa_sdk/forms.py)

So far, I’ve tried the following to resolve this:

  1. pip install rasa-sdk
  2. pip install --upgrade rasa-sdk
  3. import rasa_sdk, then from rasa_sdk import forms, and then form_action = forms.FormAction

None of which worked. Was this removed in one of the versions between 2.8 and 3.6? If so, is there an alternative?

1 Like