question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CTRL+C during button selection in interactive mode causes exception

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
kevinthemselfcommented, Nov 18, 2019

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

0reactions
stale[bot]commented, Jan 3, 2021

This issue has been automatically closed due to inactivity. Please create a new issue if you need more help.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found