aws-amicleaner
aws-amicleaner copied to clipboard
`_curses.error: setupterm: could not find terminal` on CI systems
When running this command-
amicleaner -f --full-report --mapping-key tags --mapping-values Name Branch --keep-previous 2
on CircleCI the result is-
Traceback (most recent call last):
File "/usr/local/bin/amicleaner", line 7, in <module>
from amicleaner.cli import main
File "/usr/local/lib/python3.6/site-packages/amicleaner/cli.py", line 13, in <module>
from .resources.config import MAPPING_KEY, MAPPING_VALUES
File "/usr/local/lib/python3.6/site-packages/amicleaner/resources/config.py", line 9, in <module>
TERM = Terminal()
File "/usr/local/lib/python3.6/site-packages/blessings/__init__.py", line 105, in __init__
self._init_descriptor)
_curses.error: setupterm: could not find terminal
The solution to this is to set the environmental variable TERM
to xterm
-
export TERM=xterm && amiclean
It may be worth updating the readme for people who encounter this issue.