aws-amicleaner icon indicating copy to clipboard operation
aws-amicleaner copied to clipboard

`_curses.error: setupterm: could not find terminal` on CI systems

Open tedivm opened this issue 6 years ago • 1 comments

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

tedivm avatar Apr 23 '18 20:04 tedivm

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.

tedivm avatar Apr 24 '18 15:04 tedivm