Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New action creation fails in rasa interactive #9977

Closed
tayfun opened this issue Oct 25, 2021 · 4 comments · Fixed by #10974
Closed

New action creation fails in rasa interactive #9977

tayfun opened this issue Oct 25, 2021 · 4 comments · Fixed by #10974
Assignees
Labels
3.0.0rc-QA-issue A problem found during the QA of rasa==3.0.0 release candidate area:rasa-oss 🎡 Anything related to the open source Rasa framework type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style.

Comments

@tayfun
Copy link
Contributor

tayfun commented Oct 25, 2021

h3. Rasa Open Source version

2.8.12

h3. Rasa SDK version

No response

h3. Rasa X version

No response

h3. Python version

3.8

h3. What operating system are you using?

OSX

h3. What happened?

A new action creation in rasa interactive fails with errors:

? What is the next action of the bot?

? Please type the action name: utter_uk ? Please type the message for your new bot response 'utter_uk': London is in the UK. Thanks! The bot will now run utter_uk. 2021-10-25 16:54:44 DEBUG rasa.core.lock_store - Issuing ticket for conversation '63f3066b6866454ca6d9f2a1d3abe23b'. 2021-10-25 16:54:44 DEBUG rasa.core.lock_store - Acquiring lock for conversation '63f3066b6866454ca6d9f2a1d3abe23b'. 2021-10-25 16:54:44 DEBUG rasa.core.lock_store - Acquired lock for conversation '63f3066b6866454ca6d9f2a1d3abe23b'. 2021-10-25 16:54:44 DEBUG rasa.core.tracker_store - Recreating tracker for id '63f3066b6866454ca6d9f2a1d3abe23b' 2021-10-25 16:54:44 DEBUG rasa.core.lock_store - Deleted lock for conversation '63f3066b6866454ca6d9f2a1d3abe23b'. 2021-10-25 16:54:44 DEBUG rasa.server - Traceback (most recent call last): File "/Users/tayfun/w/rasa/rasa/shared/core/domain.py", line 932, in index_for_action return self.action_names_or_texts.index(action_name) ValueError: 'utter_uk' is not in list During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/tayfun/w/rasa/rasa/server.py", line 902, in execute_action await app.agent.execute_action( File "/Users/tayfun/w/rasa/rasa/core/agent.py", line 610, in execute_action prediction = PolicyPrediction.for_action_name( File "/Users/tayfun/w/rasa/rasa/core/policies/policy.py", line 554, in for_action_name probabilities = confidence_scores_for(action_name, confidence, domain) File "/Users/tayfun/w/rasa/rasa/core/policies/policy.py", line 619, in confidence_scores_for idx = domain.index_for_action(action_name) File "/Users/tayfun/w/rasa/rasa/shared/core/domain.py", line 934, in index_for_action self.raise_action_not_found_exception(action_name) File "/Users/tayfun/w/rasa/rasa/shared/core/domain.py", line 948, in raise_action_not_found_exception raise ActionNotFoundException( rasa.shared.core.domain.ActionNotFoundException: Cannot access action 'utter_uk', as that name is not a registered action for this domain. Subsequently when you exit the interactive shell, you'll find that domain file cannot be exported to yaml file: 2021-10-25 16:55:04 ERROR rasa.core.training.interactive - An exception occurred while recording messages. Traceback (most recent call last): File "/Users/tayfun/w/rasa/rasa/core/training/interactive.py", line 1516, in record_messages await _enter_user_message(conversation_id, endpoint) File "/Users/tayfun/w/rasa/rasa/core/training/interactive.py", line 1354, in _enter_user_message message = await _ask_questions(question, conversation_id, endpoint, lambda a: not a) File "/Users/tayfun/w/rasa/rasa/core/training/interactive.py", line 325, in _ask_questions should_retry = await _ask_if_quit(conversation_id, endpoint) File "/Users/tayfun/w/rasa/rasa/core/training/interactive.py", line 651, in _ask_if_quit await _write_data_to_file(conversation_id, endpoint) File "/Users/tayfun/w/rasa/rasa/core/training/interactive.py", line 628, in _write_data_to_file _retry_on_error(_write_domain_to_file, domain_path, events, domain) File "/Users/tayfun/w/rasa/rasa/core/training/interactive.py", line 605, in _retry_on_error return func(export_path, *args, **kwargs) File "/Users/tayfun/w/rasa/rasa/core/training/interactive.py", line 959, in _write_domain_to_file old_domain.merge(new_domain).persist_clean(domain_path) File "/Users/tayfun/w/rasa/rasa/shared/core/domain.py", line 1569, in persist_clean as_yaml = self.as_yaml(clean_before_dump=True) File "/Users/tayfun/w/rasa/rasa/shared/core/domain.py", line 1594, in as_yaml domain_data[KEY_RESPONSES] = self.get_responses_with_multilines( File "/Users/tayfun/w/rasa/rasa/shared/core/domain.py", line 1440, in get_responses_with_multilines response_text = example.get(KEY_RESPONSES_TEXT, "") AttributeError: 'str' object has no attribute 'get' h3. Command / Request No response h3. Relevant log output No response

@tayfun tayfun added type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style. area:rasa-oss 🎡 Anything related to the open source Rasa framework labels Oct 25, 2021
@tayfun tayfun self-assigned this Oct 25, 2021
@sara-tagger
Copy link
Collaborator

Thanks for the issue, @akelad will get back to you about it soon!

You may find help in the docs and the forum, too 🤗

@TyDunn
Copy link
Contributor

TyDunn commented Oct 28, 2021

@tayfun can this be closed?

@tayfun
Copy link
Contributor Author

tayfun commented Oct 29, 2021

@TyDunn Not yet, I mentioned it in the other ticket (for intents, this one for actions) because this is also in rasa interactive, but I haven't started working on this one yet.

@indam23
Copy link
Contributor

indam23 commented Nov 15, 2021

This does work for new custom actions on main/3.0.0rc2 for the record. However, there is this misleading log which looks like an error until you read carefully:

2021-11-15 21:25:21 ERROR    rasa.server  - An unexpected error occurred. Error: Cannot access action 'action_help', 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_extract_slots
         - utter_cheer_up
         - utter_did_that_help
         - utter_goodbye
         - utter_greet
         - utter_happy
         - utter_iamabot
? WARNING: You have created a new action: 'action_help', which was not successfully executed. If this action does not return any events, you do not need to do anything. If this is a custom action which returns events, you are recommended to implement th
is action in your action server and try again. Yes     

Should I create a separate issue for this or is it part of this one?

For new responses (utter_ actions), the same error as @tayfun reported above occurs in 3.0.0rc2

@indam23 indam23 added the 3.0.0rc-QA-issue A problem found during the QA of rasa==3.0.0 release candidate label Nov 15, 2021
@m-vdb m-vdb mentioned this issue Mar 14, 2022
4 tasks
@rasabot-exalate rasabot-exalate added area:rasa-oss and removed type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style. area:rasa-oss 🎡 Anything related to the open source Rasa framework labels Mar 16, 2022 — with Exalate Issue Sync
@m-vdb m-vdb added type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style. type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. and removed type:maintenance labels Mar 16, 2022
@rasabot-exalate rasabot-exalate added type:maintenance type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style. and removed type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style. type:maintenance labels Mar 16, 2022 — with Exalate Issue Sync
@rasabot-exalate rasabot-exalate added area:rasa-oss 🎡 Anything related to the open source Rasa framework type:maintenance_:wrench: type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style. and removed type:maintenance_:wrench: labels Mar 17, 2022 — with Exalate Issue Sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0.0rc-QA-issue A problem found during the QA of rasa==3.0.0 release candidate area:rasa-oss 🎡 Anything related to the open source Rasa framework type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants