简体   繁体   English

Curses 应用抛出 _curses.error:init_pair() 返回 ERR

[英]Curses app throws _curses.error: init_pair() returned ERR

I have a problem whenever i run my curses application,it always runs fine on windows(thanks to windows-curses module) and other Linux Distros,but since i have Garuda Linux installed i want to run the app on it.but the problem is,whenever i run the app it yields the following error:每当我运行我的 curses 应用程序时我都会遇到问题,它总是在 Windows 上运行良好(感谢 windows-curses 模块)和其他 Linux 发行版,但是因为我安装了 Garuda Linux 我想在它上面运行应用程序。但问题是,每当我运行该应用程序时,它都会产生以下错误:

Traceback (most recent call last):
  File "/home/justaus3r/Desktop/Programming/Python/Projects/ANFU/Anfu.py", line 564, in <module>
    curses.wrapper(Main)
  File "/usr/lib/python3.9/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/justaus3r/Desktop/Programming/Python/Projects/ANFU/Anfu.py", line 330, in Main
    curses.init_pair(69, curses.COLOR_MAGENTA, -1)
_curses.error: init_pair() returned ERR

i have tried it with different terminals like xterm and Alacritty.it throws the same error,does my code has some problems or the module isn't compatible with Garuda Linux.any help is appreciated我已经在 xterm 和 Alacritty 等不同的终端上尝试过它。它抛出同样的错误,我的代码是否有一些问题或者模块与 Garuda Linux 不兼容。感谢任何帮助

I was gettiing same issue in redhat - maipo我在 redhat - maipo 中遇到了同样的问题

this worked for me这对我有用

export TERM=xterm-256color导出 TERM=xterm-256color

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM