rbonghi / jetson_stats

📊 Simple package for monitoring and control your NVIDIA Jetson [Orin, Xavier, Nano, TX] series
https://rnext.it/jetson_stats
GNU Affero General Public License v3.0
2.14k stars 261 forks source link

Program jtop does not execute in UART terminal. Throws curses init_pair error. #123

Closed anamud closed 1 year ago

anamud commented 3 years ago

Bug

The program jtop does not execute in a UART terminal. Exception is thrown from curses init_pair function.

$ jtop
Traceback (most recent call last):
  File "/usr/local/bin/jtop", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/jtop/__main__.py", line 146, in main
    curses.wrapper(JTOPGUI, jetson, [ALL, GPU, CPU, MEM, CTRL, INFO], init_page=args.page, loop=args.loop, seconds=LOOP_SECONDS)
  File "/usr/lib/python3.6/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python3.6/dist-packages/jtop/gui/jtopgui.py", line 76, in __init__
    curses.init_pair(1, curses.COLOR_RED, curses.COLOR_BLACK)
_curses.error: init_pair() returned ERR

Environment details

$ echo $TERM
vt220
$ jetson_release -v
 - NVIDIA Jetson Nano (Developer Kit Version)
   * Jetpack 4.4.1 [L4T 32.4.4]
   * NV Power Mode: MAXN - Type: 0
   * jetson_stats.service: active
 - Board info:
   * Type: Nano (Developer Kit Version)
   * SOC Family: tegra210 - ID:33
   * Module: P3448-0000 - Board: P3449-0000
   * Code Name: porg
   * Boardids: 3448
   * CUDA GPU architecture (ARCH_BIN): 5.3
   * Serial Number: 0421319028241
 - Libraries:
   * CUDA: NOT_INSTALLED
   * cuDNN: NOT_INSTALLED
   * TensorRT: NOT_INSTALLED
   * Visionworks: NOT_INSTALLED
   * OpenCV: NOT_INSTALLED compiled CUDA: NO
   * VPI: NOT_INSTALLED
   * Vulkan: 1.2.70
 - jetson-stats:
   * Version 3.0.2
   * Works on Python 3.6.9
anamud commented 3 years ago

Additionally, I have ensured that these ncurses tests execute on the UART terminal. They execute without color, which is fine and expected on the vt220. I expect jtop to work without color support. Please let me know if this is not the case i.e., colors are essential for jtop working.

awandzel commented 2 years ago

Fixed it by setting: export TERM='xterm-256color', which sets your terminal to have default 256 color.

rbonghi commented 1 year ago

This error should now be fixed with the latest release 4.0 try to install and check again

sudo -H pip install -U jetson-stats