Skip to content

keyboard_and_audio not working in notebook #13

Description

@thorwhalen

Running keyboard_and_audio in terminal works, but
when in (DataSpell) notebook, I get the following error.

from stream2py.examples.usage.keyboard_and_audio import keyboard_and_audio

keyboard_and_audio()

Gets me too...

Exception in thread Thread-8:
Traceback (most recent call last):
  File "/Users/Thor.Whalen/Dropbox/dev/p3/proj/i/stream2py/stream2py/utility/getch.py", line 11, in __init__
    self.impl = _GetchWindows(is_blocking)
  File "/Users/Thor.Whalen/Dropbox/dev/p3/proj/i/stream2py/stream2py/utility/getch.py", line 75, in __init__
    import msvcrt
ModuleNotFoundError: No module named 'msvcrt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/Thor.Whalen/.pyenv/versions/3.8.6/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/Users/Thor.Whalen/Dropbox/dev/p3/proj/i/stream2py/stream2py/sources/keyboard_input.py", line 61, in run
    from stream2py.utility.getch import getch
  File "/Users/Thor.Whalen/Dropbox/dev/p3/proj/i/stream2py/stream2py/utility/getch.py", line 100, in <module>
    getch = _Getch()
  File "/Users/Thor.Whalen/Dropbox/dev/p3/proj/i/stream2py/stream2py/utility/getch.py", line 13, in __init__
    self.impl = _GetchUnix(is_blocking)
  File "/Users/Thor.Whalen/Dropbox/dev/p3/proj/i/stream2py/stream2py/utility/getch.py", line 27, in __init__
    self.old_settings = termios.tcgetattr(self.fd)
termios.error: (25, 'Inappropriate ioctl for device')

┆Issue is synchronized with this Asana task by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions