IngoMeyer441 / simple-term-menu

A Python package which creates simple interactive menus on the command line.
MIT License
492 stars 43 forks source link

tput: No value for $TERM and no -T specified #76

Closed error13 closed 1 year ago

error13 commented 1 year ago

on Linux Mint 19 Cinnamon

to reproduce: from simple_term_menu import TerminalMenu

 terminal_menu = TerminalMenu(["entry 1", "entry 2", "entry 3"])
 terminal_menu.show()

tput: No value for $TERM and no -T specified line 3, in terminal_menu = TerminalMenu(["entry 1", "entry 2", "entry 3"])

very new to python and programing so forgive me if this is easily fixed

IngoMeyer441 commented 1 year ago

Hey @error13 and welcome to Python programming! The TERM variable is usually set by your terminal emulator and is used by tput to generate the correct control codes for things like cursor movement, text formatting and others. Which terminal emulator do you use?

error13 commented 1 year ago

Terminator running the command: echo $TERM ~ $ xterm-256color

i checked the config file in from Terminator Config.py 'term' : 'xterm-256color',

other then this and I'm out of gas thanks for your help

also i ran: env | grep TERM > result.txt TERMINATOR_UUID=urn:uuid:625f39e6---ect.... COLORTERM=truecolor TERMINATOR_DBUS_NAME=net.tenshu.Terminator20x1a6021154d881c TERMINATOR_DBUS_PATH=/net/tenshu/Terminator2 TERM=xterm-256color

IngoMeyer441 commented 1 year ago

As a first workaround you could call Python like this:

TERM=xterm-256color python

But I don't know why this is necessary for your setup. I will fetch Linux Mint 19 and try to run simple-term-menu with Terminator.

IngoMeyer441 commented 1 year ago

I cannot reproduce your problem on a fresh Linux Mint 19 Cinnamon in Terminator :disappointed:.

error13 commented 1 year ago

so i tried your workaround and that worked. so i did some digging around in pycharm and found by selecting emulate terminal in output console fixed the problem thanks for all your help! Screenshot from 2023-06-14 20-48-41