sandsifter icon indicating copy to clipboard operation
sandsifter copied to clipboard

_curses.error: init_pair() returned ERR

Open uid89626 opened this issue 8 years ago • 4 comments

Python 2.7.6

Traceback (most recent call last): File "./sifter.py", line 842, in main() File "./sifter.py", line 833, in main gui = Gui(ts, injector, tests, args.tick) File "./sifter.py", line 376, in init self.init_colors() File "./sifter.py", line 423, in init_colors self.COLOR_BLACK _curses.error: init_pair() returned ERR

uid89626 avatar Jul 28 '17 21:07 uid89626

Workaround - try export TERM='xterm-256color' before starting sifter. I guess your default terminal isn't 256 colour (same as my Linux Mint).

drpixie avatar Jul 30 '17 05:07 drpixie

same issue here, just fake the TERM variable and it works.

f4grx avatar Aug 01 '17 08:08 f4grx

What is the point of using such colors and not having any fallback to the default colors available on allmost all terminals? Sure the program will run on a terminal without 256 color palette but it won't be drawn correctly.

ghost avatar Aug 09 '17 12:08 ghost

Set TERM=xterm-256color, still error:

Traceback (most recent call last):
                                    File "./summarize.py", line 751, in <module>
                                                                                    textbox.draw()
                                                                                                    File "/home/catalinp/src/phi/sandsifter/gui/gui.py", line 68, in draw
                                       self.gui.box(self.window, self.x, self.y, self.w, self.h, self.color)
                                                                                                              File "/home/catalinp/src/phi/sandsifter/gui/gui.py", line 175, in box
                                                 window.addch(y + h - 1, x + i, curses.ACS_HLINE, color)
                                                                                                        _curses.error: addch() returned ERR

EDIT: resized my terminal to make it bigger, now works

cpatulea avatar Mar 09 '21 03:03 cpatulea