termdown snap package is broken
Vaisakhkm2625 opened this issue · comments
Hi
First of all, thanks for making this wonderful yet simple app... i almost use it every day
i noticed that termdown installed from snap store is not working properly...
https://snapcraft.io/termdown
it is showing:
~ took 2s
❯ snap run termdown
Traceback (most recent call last):
File "/snap/termdown/26/bin/termdown", line 8, in <module>
sys.exit(main())
File "/snap/termdown/26/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/snap/termdown/26/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/snap/termdown/26/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/snap/termdown/26/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/snap/termdown/26/lib/python3.8/site-packages/termdown.py", line 761, in main
seconds_elapsed, laps = curses.wrapper(stopwatch, **kwargs)
File "/usr/lib/python3.8/curses/__init__.py", line 84, in wrapper
stdscr = initscr()
File "/usr/lib/python3.8/curses/__init__.py", line 29, in initscr
setupterm(term=_os.environ.get("TERM", "unknown"),
_curses.error: setupterm: could not find terminal
it was weird because simple python curses script i wrote is working in terminal....
so I googled for error and found
https://stackoverflow.com/questions/9485699/setupterm-could-not-find-terminal-in-python-program-using-curses
so i did
export TERM=linux
export TERMINFO=/etc/terminfo
then it started working...
so this is might be issue with sandboxed nature of snap,
i am hoping you could do some work around like hard coding these variables... or fix packaging
please consider closing this issue if i am wrong
Thanks.
(btw, i am using it from pypi)