iwatake2222/rotop

rotop does not work on tmux with `init_extended_color() returned ERR` error

kminoda opened this issue · 3 comments

Thank you for the tool, it is very useful!!

But unfortunately rotop failed in some of my environment with the following message:

$ rotop
rotop version 0.1.4 by iwatake2222
Traceback (most recent call last):
  File "/home/minoda/.local/bin/rotop", line 8, in <module>
    sys.exit(main())
  File "/home/minoda/.local/lib/python3.10/site-packages/rotop/rotop.py", line 82, in main
    curses.wrapper(main_curses, args)
  File "/usr/lib/python3.10/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/minoda/.local/lib/python3.10/site-packages/rotop/rotop.py", line 28, in main_curses
    curses.init_color(0, 0, 0, 0)
_curses.error: init_extended_color() returned ERR

After doing some quick research, it seems that the tmux is the cause here.

$ echo $TERM
tmux-256color

This is not critical since l can use this tool by exiting the tmux first and then executing it anyway, but since I was not sure how to fix it, would be glad if anyone could solve this issue. Thanks!

@kminoda
Thank you for reporting the issue!
I didn't care tmux. I fixed the issue and will release the new version in PyPI soon!

The new version with the bug fix has been released!

pip3 install rotop>=0.1.5

Thank you very much!!