17.3 Aria ChatBot rasa_train error using RASA 1.8.3.

book

Article ID: 197705

calendar_today

Updated On:

Products

CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager

Issue/Introduction

2020-01-01 17:33:43 INFO     rasa_sdk.endpoint  - Starting action endpoint server...

2020-01-01 17:33:43 ERROR    rasa_sdk.executor  - Failed to register package 'actions'.
Traceback (most recent call last):
  File "c:\aria2\botenv\lib\site-packages\rasa_sdk\executor.py", line 250, in register_package
    self._import_submodules(package)
  File "c:\aria2\botenv\lib\site-packages\rasa_sdk\executor.py", line 213, in _import_submodules
    self._import_module(full_name)
  File "c:\aria2\botenv\lib\site-packages\rasa_sdk\executor.py", line 227, in _import_module
    module = importlib.import_module(name)
  File "C:\ProgramData\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Aria2\casm-bot\actions\CreateTicketForm.py", line 4, in <module>
    from rasa_core_sdk import ActionExecutionRejection
ModuleNotFoundError: No module named 'rasa_core_sdk'

 

In rasa_run, this message will also appear:


2020-01-01 17:36:03 ERROR    rasa.core.actions.action  - Failed to run custom action 'search_kd_form'. Couldn't connect to the server at 'http://localhost:5055/webhook'. Is the server running? Error: Cannot connect to host localhost:5055 ssl:default [Connect call failed ('127.0.0.1', 5055)]

2020-01-01 17:36:03 ERROR    rasa.core.processor  - Encountered an exception while running action 'search_kd_form'. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.

aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host localhost:5055 ssl:default [Connect call failed ('127.0.0.1', 5055)]

From user perspective, even a simple interaction such as clicking on "I have new issue / problem" will result in this interaction, stating "Relationships and cryptic text are the only two things I am not good at, how about we try again!"

 

Cause

Issue is specific to using rasa release 1.8.3.  As a result of the introduction of this release of Rasa, the backend scripts in the casm bot directory need to be updated.

Environment

Release : 17.3

Component : SERVICE DESK MANAGER

Resolution

  1. Stop the Aria ChatBot by closing out the Anaconda Command Prompt instance.

  2. Access the "casm-bot" directory where you have the Aria Chatbot installed.

  3. Backup the "actions" directory under the "casm-bot" directory.  We advise copying the entire "actions" directory into a separate folder rather than right click/copy/paste the "actions" directory, creating an "actions - Copy" directory under "casm-bot" directory.

  4. Under the "actions" directory inside the casm-bot, replace the string “rasa_core_sdk” with “rasa_sdk” in all the files.  Save the files when done.
    The easiest way to achieve this is to open all of the files in the "actions" directory in Notepad or Notepad ++ and do a Replace action, changing all references to string “rasa_core_sdk” with “rasa_sdk”

  5. Start a new Anaconda Command Prompt and restart Aria Chatbot:
    cd to the Aria directory

    Run ".\botenv\Scripts\activate"

    cd to the casm-bot directory

    Run "rasa_train", then "rasa_run"

Subsequent interactions will look like this (correct):

Attachments