termios.error: (25, 'Inappropriate ioctl for device')
See original GitHub issueI was using simple-term-menu for writing a git hook when I ran into the following problem:
stty: stdin isn't a terminal
Traceback (most recent call last):
File ".git/hooks/pre-push", line 52, in <module>
check_versions(local_sha)
File ".git/hooks/pre-push", line 46, in check_versions
ask_confirmation(metadata['api']['version'], openapi_rest['info']['version'])
File ".git/hooks/pre-push", line 33, in ask_confirmation
if TerminalMenu(["[y] Yes", "[n] No"]).show() == 1:
File "/Users/miguel.perez/.local/share/virtualenvs/mecrtrrfco-api-ebjNHAQ0/lib/python3.7/site-packages/simple_term_menu.py", line 1002, in show
self._init_term()
File "/Users/miguel.perez/.local/share/virtualenvs/mecrtrrfco-api-ebjNHAQ0/lib/python3.7/site-packages/simple_term_menu.py", line 619, in _init_term
self._old_term = termios.tcgetattr(self._fd)
termios.error: (25, 'Inappropriate ioctl for device')
Any ideas? 🤷♂️
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
termios.error: (25, 'Inappropriate ioctl for device') #11 - GitHub
I have it. Running it with thunar, it returns the error:: termios.error: (25, 'Inappropriate ioctl for device').
Read more >Pycharm 2019 termios.error: (25, 'Inappropriate ioctl for device')
I'm getting the following error on Pycharm 2019.1.1. OS ubuntu 16.04. Steps to reproduce: ``` # test.py import sysfrom termios import...
Read more >pipenv shell in Jenkins return the issue termios.error
python - pipenv shell in Jenkins return the issue termios. error: (25, 'Inappropriate ioctl for device') - Stack Overflow. Stack Overflow for ...
Read more >Error: (25, 'Inappropriate ioctl for device') - PlatformIO Core
It seems the combination “platformio device monitor” in background + stdout redirection is not supported on Linux (tested on Ubuntu 20.04).
Read more >Issue with termios and pipes : r/learnpython - Reddit
The exact error I'm getting is old_settings = self.termios.tcgetattr(fd) termios.error: (25, 'Inappropriate ioctl for device').
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 Free
Top 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

Perhaps, I should throw a better error message if simple-term-menu is not connected to a terminal.
Great, thanks for testing! Release v0.10.4 is out which contains the changes. Have fun! 😄