Forms not working in the latest rasa x

In Version: 0.26.1, I am stuck with this issue:

It is detecting the intent for triggering the forms, but it is not starting the form dialogue. I followed the instructions at The Rasa Masterclass Handbook: Episode 9. Any chance you can help me out or connect me to someone that has time, please? It must be something to do with “rasa run actions” not working in the remote docker. However, I am also not sure how to check the action logs.

Looks like others are having this issue as well: Rasa X server forms not working

I have not tried with lower versions of rasa-x.

Here is some information:

/etc/rasa$ ps -aef|grep rasa

...sid+ 25998 25970 0 09:34 ? 00:00:01 python -m rasa_sdk --actions actions.actions...

$ sudo docker-compose logs rasa-production ...rasa-production_1 | 2020-03-18 09:36:27 ERROR rasa.core.processor - Encountered an exception while running action 'submit_form'. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information...

@akelad, are you able to help with this. I saw you posted at Rasa X with Docker, Custom action not working. Not sure if this is relevant.

And I am having this issue when I try running “rasa x” locally:

$ rasa x
2020-03-18 07:58:38.755684: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2020-03-18 07:58:38.756025: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
2020-03-18 07:58:38.756035: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
  File "/home/sid/anaconda3/bin/rasa", line 8, in <module>
    sys.exit(main())
  File "/home/sid/anaconda3/lib/python3.7/site-packages/rasa/__main__.py", line 91, in main
    cmdline_arguments.func(cmdline_arguments)
  File "/home/sid/anaconda3/lib/python3.7/site-packages/rasa/cli/x.py", line 326, in rasa_x
    run_locally(args)
  File "/home/sid/anaconda3/lib/python3.7/site-packages/rasa/cli/x.py", line 414, in run_locally
    from rasax.community import local  # pytype: disable=import-error
  File "/home/sid/anaconda3/lib/python3.7/site-packages/rasax/community/local.py", line 15, in <module>
    from rasax.community import config, metrics, sql_migrations, __version__
  File "/home/sid/anaconda3/lib/python3.7/site-packages/rasax/community/sql_migrations.py", line 14, in <module>
    from rasax.community.services.settings_service import SettingsService
  File "/home/sid/anaconda3/lib/python3.7/site-packages/rasax/community/services/settings_service.py", line 12, in <module>
    from rasax.community.services.data_service import DataService
  File "/home/sid/anaconda3/lib/python3.7/site-packages/rasax/community/services/data_service.py", line 26, in <module>
    from rasax.community.services.stack_service import nlu_format
  File "/home/sid/anaconda3/lib/python3.7/site-packages/rasax/community/services/stack_service.py", line 10, in <module>
    from rasa.core.utils import concat_url, dump_obj_as_yaml_to_string
**ImportError: cannot import name 'concat_url' from 'rasa.core.utils'**

Select your text and press Ctrl+Shift+C for formatting it in code style

ImportError: cannot import name 'concat_url' says we have to downgrade rasa. Probably, we should downgrade rasa x also? (I used the latest version). What versions of rasa and rasa x are recommended and compatible?

Hi @sidkgp running Rasa X locally isn’t really recommended. And it’s not necessary to downgrade Rasa Open Source.

You have Rasa X running with the docker-compose deployment option though right? Can you post the full logs of rasa-production and the app?

Sure @akelad. I also included couple more pieces of info below them to help further.

/etc/rasa$ sudo docker-compose logs rasa-production

Attaching to rasa_rasa-production_1
rasa-production_1  | 2020-03-18 07:58:57.754024: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.s
o.6: cannot open shared object file: No such file or directory
rasa-production_1  | 2020-03-18 07:58:57.754440: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnv
infer_plugin.so.6: cannot open shared object file: No such file or directory
rasa-production_1  | 2020-03-18 07:58:57.754521: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with
 TensorRT, please make sure the missing libraries mentioned above are installed properly.
rasa-production_1  | 2020-03-18 07:59:22 ERROR    pika.adapters.utils.io_services_utils  - Socket failed to connect: <socket.socket fd=21, family=AddressFamily.AF_INET, type=2049, prot
o=6, laddr=('172.18.0.7', 59920)>; error=111 (Connection refused)
rasa-production_1  | 2020-03-18 07:59:22 ERROR    pika.adapters.utils.connection_workflow  - TCP Connection attempt failed: ConnectionRefusedError(111, 'Connection refused'); dest=(<Ad
dressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('172.18.0.4', 5672))
rasa-production_1  | 2020-03-18 07:59:22 ERROR    pika.adapters.utils.connection_workflow  - AMQPConnector - reporting failure: AMQPConnectorSocketConnectError: ConnectionRefusedError(
111, 'Connection refused')
rasa-production_1  | 2020-03-18 07:59:27 ERROR    pika.adapters.utils.io_services_utils  - Socket failed to connect: <socket.socket fd=25, family=AddressFamily.AF_INET, type=2049, prot
o=6, laddr=('172.18.0.7', 59938)>; error=111 (Connection refused)
rasa-production_1  | 2020-03-18 07:59:27 ERROR    pika.adapters.utils.connection_workflow  - TCP Connection attempt failed: ConnectionRefusedError(111, 'Connection refused'); dest=(<Ad
dressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('172.18.0.4', 5672))
rasa-production_1  | 2020-03-18 07:59:27 ERROR    pika.adapters.utils.connection_workflow  - AMQPConnector - reporting failure: AMQPConnectorSocketConnectError: ConnectionRefusedError(
111, 'Connection refused')
rasa-production_1  | 2020-03-18 07:59:32 ERROR    pika.adapters.utils.io_services_utils  - Socket failed to connect: <socket.socket fd=25, family=AddressFamily.AF_INET, type=2049, prot
o=6, laddr=('172.18.0.7', 59946)>; error=111 (Connection refused)
rasa-production_1  | 2020-03-18 07:59:32 ERROR    pika.adapters.utils.connection_workflow  - TCP Connection attempt failed: ConnectionRefusedError(111, 'Connection refused'); dest=(<Ad
dressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('172.18.0.4', 5672))
rasa-production_1  | 2020-03-18 07:59:32 ERROR    pika.adapters.utils.connection_workflow  - AMQPConnector - reporting failure: AMQPConnectorSocketConnectError: ConnectionRefusedError(
111, 'Connection refused')
rasa-production_1  | 2020-03-18 09:15:11.952044: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303)
rasa-production_1  | 2020-03-18 09:23:10 WARNING  rasa.core.featurizers  - Feature 'intent_restart' could not be found in feature map.
rasa-production_1  | 2020-03-18 09:26:46 ERROR    rasa.core.processor  - Encountered an exception while running action 'submit_form'. Bot will continue, but the actions events are lost
. Please check the logs of your action server for more information.
rasa-production_1  | 2020-03-18 09:35:23 ERROR    rasa.core.channels.rasa_chat  - JWT public key invalid, fetching new one.
rasa-production_1  | 2020-03-18 09:35:23 WARNING  rasa.core.featurizers  - Feature 'intent_restart' could not be found in feature map.
rasa-production_1  | 2020-03-18 09:35:33 ERROR    rasa.core.processor  - Encountered an exception while running action 'submit_form'. Bot will continue, but the actions events are lost
. Please check the logs of your action server for more information.
rasa-production_1  | 2020-03-18 09:36:27 ERROR    rasa.core.processor  - Encountered an exception while running action 'submit_form'. Bot will continue, but the actions events are lost
. Please check the logs of your action server for more information. 

/etc/rasa$ sudo docker-compose logs app

Attaching to rasa_app_1
app_1              | 2020-03-18 09:35:00 INFO     rasa_sdk.endpoint  - Starting action endpoint server...
app_1              | 2020-03-18 09:35:00 ERROR    rasa_sdk.executor  - Failed to register package 'actions.actions'.
app_1              | Traceback (most recent call last):
app_1              |   File "/app/rasa_sdk/executor.py", line 206, in register_package
app_1              |     self._import_submodules(package)
app_1              |   File "/app/rasa_sdk/executor.py", line 191, in _import_submodules
app_1              |     package = importlib.import_module(package)
app_1              |   File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
app_1              |     return _bootstrap._gcd_import(name[level:], package, level)
app_1              |   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
app_1              |   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
app_1              |   File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
app_1              | ModuleNotFoundError: No module named 'actions.actions'
app_1              | 2020-03-18 09:35:33 ERROR    rasa_sdk.endpoint  - No registered action found for name 'submit_form'.
app_1              | 2020-03-18 09:36:27 ERROR    rasa_sdk.endpoint  - No registered action found for name 'submit_form'.

The submit form is in actions/actions.py as recommended in the tutorial:

cat actions/actions.py | grep -i submit
class SubmitForm(FormAction):
        return "submit_form"
    def submit(
        dispatcher.utter_message("Thanks for submitting the information, we’ll review and update soon.")

And the submit form is working locally.

Bot loaded. Type a message and press enter (use '/stop' to exit): 
Your input ->  submit                                                                          
What kind of information is this?

@sidkgp it seems like your actions aren’t loaded properly - how are you running those?

Really sorry for the delay in responding. For some reason I didn’t get notified. I tried the instructions now and it is working. Probably, I forgot to run the actions server.