CTRL+C during button selection in interactive mode causes exception
See original GitHub issueRasa 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:
rasa interactive
- 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.
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (9 by maintainers)
Top Results From Across the Web
Control-C handling in Python and Trio - Nathaniel J. Smith
By default, the Python interpreter sets things up so that control-C will cause a KeyboardInterrupt exception to materialize at some point in ...
Read more >Why doesn't this Python keyboard interrupt work? (in PyCharm)
PyCharm's Python Console raises the exception console_thrift.KeyboardInterruptException on Ctrl-C instead of KeyboardInterrupt .
Read more >Built-in Exceptions — Python 3.11.1 documentation
An explicitly chained exception in __cause__ is always shown when present. ... Raised when the user hits the interrupt key (normally Control -...
Read more >How to quit `tail -f` mode without using `Ctrl+c`?
"Ctrl-C does not kill the tail process" - Yes it does. Or at least as much as kill <pid> does. For most programs,...
Read more >CTRL+C and CTRL+BREAK Signals - Windows Console
By default, when a console window has the keyboard focus, CTRL + C or CTRL + BREAK is treated as a signal (SIGINT...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure, I think I’ll have time to address it sometime this week 😃
This issue has been automatically closed due to inactivity. Please create a new issue if you need more help.