键盘弦代码的错误消息:术语错误:(25,“设备的ioctl不合适”)

2024-09-27 07:25:09 发布

您现在位置:Python中文网/ 问答频道 /正文

我是一个python初学者,最近我试图编写一个需要readchar模块的程序。但是,我一直收到错误消息:

termios.error: (25, 'Inappropriate ioctl for device')

我试着调整我的代码,但是我总是收到同样的错误消息。这是我的代码:

^{pr2}$

(这是完整的错误消息。)

Traceback (most recent call last):
   File "/Users/larajean/PycharmProjects/thegreatesthits/chordkeyboard.py", line 7, in <module>
chord = readchar.readkey()
   File "/Users/larajean/PycharmProjects/thegreatesthits/venv/lib/python2.7/site-packages/readchar/readchar.py", line 20, in readkey
c1 = getchar()
   File "/Users/larajean/PycharmProjects/thegreatesthits/venv/lib/python2.7/site-packages/readchar/readchar_linux.py", line 12, in readchar
old_settings = termios.tcgetattr(fd)
termios.error: (25, 'Inappropriate ioctl for device')

我使用的是PyCharm IDE和python2.7版本。关于如何解决这个问题有什么建议吗?在


Tags: inpy消息错误lineerrorusersfile

热门问题