Getting error during rasa interactive command

I want to create intent, stories and domain response by using command rasa interactive.

I can create successfully intent and stories but for domain response i am getting below error.

I have paste the details below.

rasa interactive
Nothing changed. You can use the old model stored at 'D:\OPM_Project_New_7\Jagat\models\20220104-132659.tar.gz'.
2022-01-04 13:33:06 INFO     rasa.model  - Loading model models\20220104-132659.tar.gz...
2022-01-04 13:33:07.484178: E tensorflow/stream_executor/cuda/cuda_driver.cc:314] failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error
d:\opm_project_new_7\venv\lib\site-packages\rasa\utils\train_utils.py:593: UserWarning: constrain_similarities is set to `False`. It is recommended to set it to `True` when using cross-entropy loss. It will be set to `True` by default, Rasa Open Source 3.0.0 onwards.
  category=UserWarning,
d:\opm_project_new_7\venv\lib\site-packages\rasa\utils\train_utils.py:565: UserWarning: model_confidence is set to `softmax`. It is recommended to try using `model_confidence=linear_norm` to make it easier to tune fallback thresholds.
  category=UserWarning,
2022-01-04 13:33:34 INFO     root  - Rasa server is up and running.
Processed story blocks: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 24/24 [00:00<00:00, 2444.83it/s, # trackers=1]
Bot loaded. Visualisation at http://localhost:5006/visualization.html .
Type a message and press enter (press 'Ctrl-c' to exit).
? Your input -> jimmy
? Your NLU model classified 'jimmy' with intent 'mood_unhappy' and there are no entities, is this correct?  No
? What intent is it?  <create_new_intent>
? Please type the intent name: jimmyname
? Please mark the entities using [value](type) notation jimmy
------
Chat History

 #    Bot                            You
────────────────────────────────────────────────
 1    action_listen
────────────────────────────────────────────────
 2                                        jimmy
                         intent: jimmyname 1.00


Current slots:
        session_started_metadata: None

------
? The bot wants to run 'action_listen', correct?  No
------
Chat History

 #    Bot                            You
────────────────────────────────────────────────
 1    action_listen
────────────────────────────────────────────────
 2                                        jimmy
                         intent: jimmyname 1.00


Current slots:
        session_started_metadata: None

------
? What is the next action of the bot?  <create new action>
? Please type the action name: utter_jimmyname
? Please type the message for your new bot response 'utter_jimmyname': yes i am jimmy
Thanks! The bot will now run utter_jimmyname.

2022-01-04 13:37:09 ERROR    rasa.server  - An unexpected error occurred. Error: Cannot access action 'utter_jimmyname', as that name is not a registered action for this domain. Available actions are:
         - action_listen
         - action_restart
         - action_session_start
         - action_default_fallback
         - action_deactivate_loop
         - action_revert_fallback_events
         - action_default_ask_affirmation
         - action_default_ask_rephrase
         - action_two_stage_fallback
         - action_back
         - ...
         - utter_Jagat
         - utter_Pinaki
         - utter_age
         - utter_home
         - utter_morning
         - utter_place
         - utter_raja
         - utter_sumi
         - utter_don
         - utter_arati
         - utter_utter_company
         - utter_company
         - utter_name
         - utter_ageman
         - utter_selectplace
         - utter_address
         - utter_jyostna
         - utter_deepa
         - utter_deepamam
         - utter_cheer_up
         - utter_did_that_help
         - utter_goodbye
         - utter_greet
         - utter_happy
         - utter_iamabot
? WARNING: You have created a new action: 'utter_jimmyname', with matching response: 'yes i am jimmy'. This action will not return its message in this session, but the new
 response will be saved to your domain file when you exit and save this session. You do not need to do anything further.  Yes
------
Chat History

 #    Bot                              You
──────────────────────────────────────────────────
 1    action_listen
──────────────────────────────────────────────────
 2                                          jimmy
                           intent: jimmyname 1.00
──────────────────────────────────────────────────
 3    utter_jimmyname


Current slots:
        session_started_metadata: None

------
? The bot wants to run 'action_listen', correct?  No
------
Chat History

 #    Bot                              You
──────────────────────────────────────────────────
 1    action_listen
──────────────────────────────────────────────────
 2                                          jimmy
                           intent: jimmyname 1.00
──────────────────────────────────────────────────
 3    utter_jimmyname


Current slots:
        session_started_metadata: None

------
? What is the next action of the bot?  (Use arrow keys)

Cancelled by user

? Do you want to stop?  Export & Quit
? Export stories to (if file exists, this will append the stories) data/stories.yml
? Export NLU data to (if file exists, this will merge learned data with previous training examples) data/nlu.yml
? Export domain file to (if file exists, this will be overwritten) domain.yml
2022-01-04 13:37:42 ERROR    rasa.core.training.interactive  - An exception occurred while recording messages.
Traceback (most recent call last):
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 1491, in record_messages
    plot_file,
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 977, in _predict_till_next_listen
    action_name, policy, confidence, predictions, endpoint, conversation_id
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 1139, in _validate_action
    predictions, conversation_id, endpoint
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 684, in _request_action_from_user
    action_name = await _ask_questions(question, conversation_id, endpoint)
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 318, in _ask_questions
    should_retry = await _ask_if_quit(conversation_id, endpoint)
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 639, in _ask_if_quit
    await _write_data_to_file(conversation_id, endpoint)
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 616, in _write_data_to_file
    _retry_on_error(_write_domain_to_file, domain_path, events, domain)
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 593, in _retry_on_error
    return func(export_path, *args, **kwargs)
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 947, in _write_domain_to_file
    old_domain.merge(new_domain).persist_clean(domain_path)
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\shared\core\domain.py", line 1554, in persist_clean
    as_yaml = self.as_yaml(clean_before_dump=True)
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\shared\core\domain.py", line 1580, in as_yaml
    domain_data[KEY_RESPONSES]
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\shared\core\domain.py", line 1425, in get_responses_with_multilines
    response_text = example.get(KEY_RESPONSES_TEXT, "")
AttributeError: 'str' object has no attribute 'get'
2022-01-04 13:37:42 ERROR    asyncio  - Task exception was never retrieved
future: <Task finished coro=<_serve_application.<locals>.run_interactive_io() done, defined at d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py:1577> exception=AttributeError("'str' object has no attribute 'get'",)>
Traceback (most recent call last):
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 1584, in run_interactive_io
    conversation_id=conversation_id,
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 1491, in record_messages
    plot_file,
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 977, in _predict_till_next_listen
    action_name, policy, confidence, predictions, endpoint, conversation_id
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 1139, in _validate_action
    predictions, conversation_id, endpoint
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 684, in _request_action_from_user
    action_name = await _ask_questions(question, conversation_id, endpoint)
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 318, in _ask_questions
    should_retry = await _ask_if_quit(conversation_id, endpoint)
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 639, in _ask_if_quit
    await _write_data_to_file(conversation_id, endpoint)
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 616, in _write_data_to_file
    _retry_on_error(_write_domain_to_file, domain_path, events, domain)
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 593, in _retry_on_error
    return func(export_path, *args, **kwargs)
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\core\training\interactive.py", line 947, in _write_domain_to_file
    old_domain.merge(new_domain).persist_clean(domain_path)
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\shared\core\domain.py", line 1554, in persist_clean
    as_yaml = self.as_yaml(clean_before_dump=True)
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\shared\core\domain.py", line 1580, in as_yaml
    domain_data[KEY_RESPONSES]
  File "d:\opm_project_new_7\venv\lib\site-packages\rasa\shared\core\domain.py", line 1425, in get_responses_with_multilines
    response_text = example.get(KEY_RESPONSES_TEXT, "")
AttributeError: 'str' object has no attribute 'get'

can anyone please help me ?

can anyone please help on above issue , it is important actually ?

@Toshiba please check that you have mention all the actions in domain.yml and even cross check all the utterance which you are using in stories or rules.yml files. Please see the error in more detail and you will be good to go.

@nik202 Thank you for your suggestion.

I want to create action in domain.yml during rasa interactive (it should not present before).

is it possible ?

@nik202

i want to create action and utter during rasa interactive and it should not present in domain.

i have posted below which i want to so in rasa interactive command

? What is the next action of the bot? ? Please type the action name: utter_jimmyname ? Please type the message for your new bot response ‘utter_jimmyname’: yes i am jimmy Thanks! The bot will now run utter_jimmyname.

after this when export and quit, it is giving error.

Can anyone please help on this issue ?

@Toshiba The way you creating the actions using utter name can be possible, but can you share some screenshot what you are doing and where you getting the error ?

Hi @nik202 thank you for your help.

I have attached all the images sequentially. Please find the attached the images.

image3

@nik202 Please find the rest images

@nik202 Please find the images

@nik202 Hi , I have attached all the images .

Can anyone please help on the above issue , I have attached screen shot from starting .

can any one please help me on this issue ? it is important actually .

@Toshiba please give me some time and I will get back to you. I have very tight schedule in work.

@nik202 thank you for helping

@Toshiba Can you share with me your rasa --version so that I can follow the dry run and If you can share some sequence of conversation that you trying to archive it will help me.

Thank you @nik202 for help.

Please find the versions rasa version = 2.8.2 rasa-sdk version = 2.8.1 rasa-x version = 0.39.3

Sequence of conversion:

Step:1 wrote the below command rasa interactive Step:2 Your input → jimmy Your NLU model classified ‘jimmy’ with intent ‘namefunction’ and there are no entities, is this correct? (Y/n) i want to declare in new intent , so i pressed ‘n’ Step:3 created below new intent (without any slot) jimmy Step:4 Then it asked below question The bot wants to run ‘action_listen’, correct? (Y/n) I want to create new action in domain here only, so i pressed ‘n’ Step:5 Then it asked below question What is the next action of the bot? (Use arrow keys) » So i created new action name: utter_jimmy Step:5 Then i typed below response for utter_jimmy i am jimmy Step:6 After that i got below error 2022-01-08 01:19:27 ERROR rasa.server - An unexpected error occurred. Error: Cannot access action ‘utter_jimmy’, as that name is not a registered action for this domain. Available actions are: - action_listen - action_restart - action_session_start - action_default_fallback - action_deactivate_loop - action_revert_fallback_events - action_default_ask_affirmation - action_default_ask_rephrase - action_two_stage_fallback - action_unlikely_intent - action_back - … - action_company - action_country_name - action_health_details - action_job_type - action_status_details - utter_age - utter_color - utter_company - utter_country - utter_deepa - utter_facemask - utter_health - utter_jagat - utter_job - utter_namefunction - utter_pinaki - utter_place - utter_spacestation - utter_status - utter_temprature - utter_cheer_up - utter_did_that_help - utter_goodbye - utter_greet - utter_happy - utter_iamabot ? WARNING: You have created a new action: ‘utter_jimmy’, with matching response: ‘i am jimmy’. This action will not return its message in this session, but the new respons e will be saved to your domain file when you exit and save this session. You do not need to do anything further. (Y/n) Then after that i pressed ‘Y’ Step:7 then it asked me below question ? The bot wants to run ‘action_listen’, correct? (Y/n) So i pressed ‘n’ and then ctrl+c and then export & quit Step:8 Then i got below error

Error: ? Do you want to stop? Export & Quit ? Export stories to (if file exists, this will append the stories) data/stories.yml ? Export NLU data to (if file exists, this will merge learned data with previous training examples) data/nlu.yml ? Export domain file to (if file exists, this will be overwritten) domain.yml 2022-01-08 01:24:07 ERROR rasa.core.training.interactive - An exception occurred while recording messages. Traceback (most recent call last): File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 1523, in record_messages plot_file, File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 997, in _predict_till_next_listen action_name, policy, confidence, predictions, endpoint, conversation_id File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 1171, in _validate_action predictions, conversation_id, endpoint File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 696, in _request_action_from_user action_name = await _ask_questions(question, conversation_id, endpoint) File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 325, in _ask_questions should_retry = await _ask_if_quit(conversation_id, endpoint) File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 651, in _ask_if_quit await _write_data_to_file(conversation_id, endpoint) File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 628, in _write_data_to_file _retry_on_error(_write_domain_to_file, domain_path, events, domain) File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 605, in _retry_on_error return func(export_path, *args, **kwargs) File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 959, in _write_domain_to_file old_domain.merge(new_domain).persist_clean(domain_path) File “d:\opm_project_new_8\venv\lib\site-packages\rasa\shared\core\domain.py”, line 1577, in persist_clean as_yaml = self.as_yaml(clean_before_dump=True) File “d:\opm_project_new_8\venv\lib\site-packages\rasa\shared\core\domain.py”, line 1603, in as_yaml domain_data[KEY_RESPONSES] File “d:\opm_project_new_8\venv\lib\site-packages\rasa\shared\core\domain.py”, line 1448, in get_responses_with_multilines response_text = example.get(KEY_RESPONSES_TEXT, “”) AttributeError: ‘str’ object has no attribute ‘get’ 2022-01-08 01:24:07 ERROR asyncio - Task exception was never retrieved future: <Task finished coro=<_serve_application..run_interactive_io() done, defined at d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py:1609> exception=AttributeError("‘str’ object has no attribute ‘get’",)> Traceback (most recent call last): File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 1616, in run_interactive_io conversation_id=conversation_id, File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 1523, in record_messages plot_file, File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 997, in _predict_till_next_listen action_name, policy, confidence, predictions, endpoint, conversation_id File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 1171, in _validate_action predictions, conversation_id, endpoint File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 696, in _request_action_from_user action_name = await _ask_questions(question, conversation_id, endpoint) File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 325, in _ask_questions should_retry = await _ask_if_quit(conversation_id, endpoint) File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 651, in _ask_if_quit await _write_data_to_file(conversation_id, endpoint) File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 628, in _write_data_to_file _retry_on_error(_write_domain_to_file, domain_path, events, domain) File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 605, in _retry_on_error return func(export_path, *args, **kwargs) File “d:\opm_project_new_8\venv\lib\site-packages\rasa\core\training\interactive.py”, line 959, in _write_domain_to_file old_domain.merge(new_domain).persist_clean(domain_path) File “d:\opm_project_new_8\venv\lib\site-packages\rasa\shared\core\domain.py”, line 1577, in persist_clean as_yaml = self.as_yaml(clean_before_dump=True) File “d:\opm_project_new_8\venv\lib\site-packages\rasa\shared\core\domain.py”, line 1603, in as_yaml domain_data[KEY_RESPONSES] File “d:\opm_project_new_8\venv\lib\site-packages\rasa\shared\core\domain.py”, line 1448, in get_responses_with_multilines response_text = example.get(KEY_RESPONSES_TEXT, “”) AttributeError: ‘str’ object has no attribute ‘get’