rasa: CTRL+C during button selection in interactive mode causes exception

Rasa version: 1.4.1

Python version: 3.6

Operating system (windows, osx, …): Docker container

Issue: When running Rasa in interactive mode, if you enter the button selection interface and attempt to exit early, an exception will be thrown and prevent you from exporting the current session to training data.

Desired behavior: Rasa should be able to process an exit command during button selection and allow for training data export.

Error (including full traceback):

2019-11-15 20:25:42 ERROR    rasa.core.training.interactive  - An exception occurred while recording messages.
Traceback (most recent call last):
  File "/build/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 1407, in record_messages
    endpoint, sender_id, sender_ids, plot_file
  File "/build/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 935, in _predict_till_next_listen
    response = _get_button_choice(last_event)
  File "/build/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 948, in _get_button_choice
    response = cliutils.payload_from_button_question(question)
  File "/build/lib/python3.6/site-packages/rasa/cli/utils.py", line 195, in payload_from_button_question
    response = response[response.find("(") + 1 : response.find(")")]
AttributeError: 'NoneType' object has no attribute 'find'
2019-11-15 20:25:42 ERROR    asyncio  - Task exception was never retrieved
future: <Task finished coro=<_serve_application.<locals>.run_interactive_io() done, defined at /build/lib/python3.6/site-packages/rasa/core/training/interactive.py:1449> exception=AttributeError("'NoneType' object has no attribute 'find'",)>
Traceback (most recent call last):
  File "/build/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 1456, in run_interactive_io
    sender_id=uuid.uuid4().hex,
  File "/build/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 1407, in record_messages
    endpoint, sender_id, sender_ids, plot_file
  File "/build/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 935, in _predict_till_next_listen
    response = _get_button_choice(last_event)
  File "/build/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 948, in _get_button_choice
    response = cliutils.payload_from_button_question(question)
  File "/build/lib/python3.6/site-packages/rasa/cli/utils.py", line 195, in payload_from_button_question
    response = response[response.find("(") + 1 : response.find(")")]
AttributeError: 'NoneType' object has no attribute 'find'

Command or request that led to error:

  1. rasa interactive
  2. receive button selection utterance, press CTRL+C and see crash

WORKAROUND: selecting to enter your own message then pressing CTRL+C will capture the exit command properly and allow for export as per normal.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

Sure, I think I’ll have time to address it sometime this week 😃