I followed this instructions
First initialized rasa with following command
docker run -it --rm -v $(pwd):/app rasa/rasa:2.8.13-full init --no-prompt
Then copied content from here
https://github.com/RasaHQ/how-to-rasa/tree/main/video-08-actions/data
Then trained bot
docker run -it --rm -v $(pwd):/app rasa/rasa:2.8.13-full train --debug
now changed to this guide
created network
docker network create my-project
and started action server
docker run --rm -v $(pwd)/actions:/app/actions --net my-project --name action-server rasa/rasa-sdk:2.8.2
and got following error
2021-11-12 14:59:06 INFO rasa_sdk.endpoint - Starting action endpoint server...
2021-11-12 14:59:06 ERROR rasa_sdk.executor - Failed to register package 'actions'.
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/rasa_sdk/executor.py", line 262, in register_package
self._import_submodules(package)
File "/opt/venv/lib/python3.8/site-packages/rasa_sdk/executor.py", line 225, in _import_submodules
self._import_module(full_name)
File "/opt/venv/lib/python3.8/site-packages/rasa_sdk/executor.py", line 239, in _import_module
module = importlib.import_module(name)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/app/actions/actions.py", line 3, in <module>
import arrow
ModuleNotFoundError: No module named 'arrow'
paulii@vetbot7:~/demobots/uusi$ docker run --rm -v $(pwd)/actions:/app/actions --net my-project --name action-server rasa/rasa-sdk:2.8.2
2021-11-12 15:06:23 INFO rasa_sdk.endpoint - Starting action endpoint server...
2021-11-12 15:06:23 ERROR rasa_sdk.executor - Failed to register package 'actions'.
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/rasa_sdk/executor.py", line 262, in register_package
self._import_submodules(package)
File "/opt/venv/lib/python3.8/site-packages/rasa_sdk/executor.py", line 225, in _import_submodules
self._import_module(full_name)
File "/opt/venv/lib/python3.8/site-packages/rasa_sdk/executor.py", line 239, in _import_module
module = importlib.import_module(name)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/app/actions/actions.py", line 3, in <module>
import arrow
ModuleNotFoundError: No module named 'arrow'
then I tried inside /action folder and it started
paulii@vetbot7:~/demobots/uusi/actions$ docker run --rm -v $(pwd)/actions:/app/actions --net my-project --name action-server rasa/rasa-sdk:2.8.2
2021-11-12 15:10:49 INFO rasa_sdk.endpoint - Starting action endpoint server...
2021-11-12 15:10:49 INFO rasa_sdk.endpoint - Action endpoint is up and running on http://0.0.0.0:5055
So then I updated endpoints
action_endpoint:
url: "http://action-server:5055/webhook"
and started Rasa in shell mode
docker run -it -v $(pwd):/app -p 5005:5005 --net my-project rasa/rasa:2.8.13-full shell
and got error
Your input -> what time it is
2021-11-12 15:16:15 ERROR rasa.core.processor - Encountered an exception while running action 'action_tell_time'.Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/rasa/core/actions/action.py", line 685, in run
response = await self.action_endpoint.request(
File "/opt/venv/lib/python3.8/site-packages/rasa/utils/endpoints.py", line 172, in request
raise ClientResponseError(
rasa.utils.endpoints.ClientResponseError: 404, Not Found, body='b'{"error":"No registered action found for name \'action_tell_time\'.","action_name":"action_tell_time"}''
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 772, in _run_action
events = await action.run(
File "/opt/venv/lib/python3.8/site-packages/rasa/core/actions/action.py", line 709, in run
raise RasaException("Failed to execute custom action.") from e
rasa.shared.exceptions.RasaException: Failed to execute custom action.
So what to try next?