rasa icon indicating copy to clipboard operation
rasa copied to clipboard

Bug in rasa interactive

Open Niebowziemii opened this issue 1 year ago • 0 comments

Rasa Open Source version

3.2.8

Rasa SDK version

3.2.1

Python version

3.9

What operating system are you using?

OSX

What happened?

After creating a new bot instance with rasa init and training the initial model with rasa interactive, the shell appears waiting for your user input. After three or four user intents this error appears: (ERROR 1 in the log form field)

This error however does not stop the rasa interactive command execution. If you ignore it after entering a few more intents the following is yield: (ERROR 2 in the log form field)

Command / Request

rasa init 
rasa train
rasa interactive

Relevant log output

========================================ERROR 1========================================
ERROR    asyncio  - Future exception was never retrieved
future: <Future finished exception=BlockingIOError(35, 'write could not complete without blocking', 0)>
Traceback (most recent call last):
  File "/Users/USERNAME/.pyenv/versions/3.9.11/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
BlockingIOError: [Errno 35] write could not complete without blocking


========================================ERROR 2========================================
Traceback (most recent call last):
  File "/Users/USERNAME/.pyenv/versions/3.9.11/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
BlockingIOError: [Errno 35] write could not complete without blocking
--- Logging error ---
2022-09-16 10:14:22 ERROR    rasa.core.training.interactive  - An exception occurred while recording messages.
Traceback (most recent call last):
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/core/training/interactive.py", line 1505, in record_messages
    await _predict_till_next_listen(
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/core/training/interactive.py", line 979, in _predict_till_next_listen
    await _print_history(conversation_id, endpoint)
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/core/training/interactive.py", line 491, in _print_history
    print("------")
BlockingIOError: [Errno 35] write could not complete without blocking
--- Logging error ---
Traceback (most recent call last):
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/core/training/interactive.py", line 1505, in record_messages
    await _predict_till_next_listen(
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/core/training/interactive.py", line 979, in _predict_till_next_listen
    await _print_history(conversation_id, endpoint)
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/core/training/interactive.py", line 491, in _print_history
    print("------")
BlockingIOError: [Errno 35] write could not complete without blocking

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/USERNAME/.pyenv/versions/3.9.11/lib/python3.9/logging/__init__.py", line 1086, in emit
    stream.write(msg + self.terminator)
BlockingIOError: [Errno 35] write could not complete without blocking
Call stack:
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/bin/rasa", line 8, in <module>
    sys.exit(main())
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/__main__.py", line 110, in main
    cmdline_arguments.func(cmdline_arguments)
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/cli/interactive.py", line 94, in interactive
    perform_interactive_learning(args, zipped_model, file_importer)
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/cli/interactive.py", line 129, in perform_interactive_learning
    do_interactive_learning(args, file_importer)
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/core/train.py", line 102, in do_interactive_learning
    interactive.run_interactive_learning(
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/core/training/interactive.py", line 1691, in run_interactive_learning
    _serve_application(app, file_importer, skip_visualization, conversation_id, port)
2022-09-16 10:14:22 ERROR    asyncio  - Task exception was never retrieved
future: <Task finished name='Task-6' coro=<SignalRouter._dispatch() done, defined at /Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/sanic/signals.py:121> exception=BlockingIOError(35, 'write could not complete without blocking', 0)>
Traceback (most recent call last):
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/sanic/signals.py", line 161, in _dispatch
    retval = await maybe_coroutine
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/sanic/app.py", line 1581, in run_delayed_task
    await prepped
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/core/training/interactive.py", line 1597, in run_interactive_io
    await record_messages(
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/core/training/interactive.py", line 1505, in record_messages
    await _predict_till_next_listen(
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/core/training/interactive.py", line 979, in _predict_till_next_listen
    await _print_history(conversation_id, endpoint)
  File "/Users/USERNAME/rasa_simple_bot_with_error/venv/lib/python3.9/site-packages/rasa/core/training/interactive.py", line 491, in _print_history
    print("------")
BlockingIOError: [Errno 35] write could not complete without blocking
--- Logging error ---
2022-09-16 10:14:22 ERROR    asyncio  - Future exception was never retrieved
future: <Future finished exception=BlockingIOError(35, 'write could not complete without blocking', 0)>
Traceback (most recent call last):
  File "/Users/USERNAME/.pyenv/versions/3.9.11/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
BlockingIOError: [Errno 35] write could not complete without blocking
2022-09-16 10:14:22 ERROR    asyncio  - Future exception was never retrieved
future: <Future finished exception=BlockingIOError(35, 'write could not complete without blocking', 0)>
Traceback (most recent call last):
  File "/Users/USERNAME/.pyenv/versions/3.9.11/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
BlockingIOError: [Errno 35] write could not complete without blocking

Niebowziemii avatar Sep 16 '22 08:09 Niebowziemii