#853210 Crashes with "_curses.error: cbreak() returned ERR"

#853210#5
Date:
2017-01-30 16:13:31 UTC
From:
To:
Piping many (most?) multipart/alternatives messages with a text/html entry to
urlscan produces the following crash:
-------------8<-------------------
Traceback (most recent call last):                                                                                                                                                                                                                 2017-01-30 11:01:38 rak pts/4
  File "/usr/lib/python3/dist-packages/urwid/display_common.py", line 763, in run_wrapper
    return fn()
  File "/usr/lib/python3/dist-packages/urlscan/urlchoose.py", line 171, in run
    keys = self.ui.get_input()
  File "/usr/lib/python3/dist-packages/urwid/curses_display.py", line 277, in get_input
    keys, raw = self._get_input( self.max_tenths )
  File "/usr/lib/python3/dist-packages/urwid/curses_display.py", line 314, in _get_input
    key = self._getch(wait_tenths)
  File "/usr/lib/python3/dist-packages/urwid/curses_display.py", line 188, in _getch
    curses.cbreak()
_curses.error: cbreak() returned ERR

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/urlscan", line 135, in <module>
    ui.main()
  File "/usr/lib/python3/dist-packages/urlscan/urlchoose.py", line 162, in main
    return self.ui.run_wrapper(self.run)
  File "/usr/lib/python3/dist-packages/urwid/display_common.py", line 763, in run_wrapper
    return fn()
  File "/usr/lib/python3/dist-packages/urwid/util.py", line 474, in __exit__
    self._wrapped.stop()
  File "/usr/lib/python3/dist-packages/urwid/display_common.py", line 750, in stop
    self._stop()
  File "/usr/lib/python3/dist-packages/urwid/curses_display.py", line 145, in _stop
    self.tty_signal_keys(*self._old_signal_keys)
  File "/usr/lib/python3/dist-packages/urwid/display_common.py", line 705, in tty_signal_keys
    termios.tcsetattr(fileno, termios.TCSADRAIN, tattr)
termios.error: (5, 'Input/output error')
-------------8<-------------------

This renders the package relatively unusable.

#853210#10
Date:
2020-07-26 08:45:07 UTC
From:
To:
I've tried to reproduce this bug with 0.9.4 and I couldn't.
Can you provide a bit more information or/if it's still the case for 0.9.4?

#853210#17
Date:
2022-06-03 10:18:08 UTC
From:
To:
close 853210
thanks

Looks like this is not a problem any more, hence closing.