- Published on
[PyCharm] ‘tput unknown terminal “emacs”’ appears when using debugging console w/ iPython
Reported issues
In debugging console (w/ iPython), tput unknown terminal 'emacs'
is repeatedly appearing.
- http://stackoverflow.com/questions/30537994/tput-unknown-terminal-emacs-messages-when-using-pycharm-ipython-console-o
- http://stackoverflow.com/questions/36133447/pandas-printing-tput-unknown-terminal-emacs
- https://youtrack.jetbrains.com/issue/PY-14999
Possible cause
- In
pycharm installation dir./helpers/pydev/_pydev_bundle/pydev_ipython_console.py
, $TERM is hard-codedline6: os.environ['TERM'] = 'emacs' #to use proper page_more() for paging
- This overwrites your $TERM setting if you use iPython console when debugging.
- If your env doesn't have terminfo for emacs, then it fails.
Workaround
- Add terminfo for emacs
- https://www.gnu.org/software/emacs/manual/html_node/efaq/Termcap_002fTerminfo-entries-for-Emacs.html
- I just copied terminfo of dumb-terminal as emacs's terminfo, and it worked. (at least stopped showing messages)
- Or, edit `pycharm installation dir./helpers/pydev/_pydev_bundle/pydev_ipython_console.py``
って内容を PyCharm の Issue Tracker に書いた. 少しは役に立つといいけど.