Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setupterm: could not find terminal #2768

Closed
Abrosimov-a-a opened this issue Nov 9, 2019 · 13 comments
Closed

setupterm: could not find terminal #2768

Abrosimov-a-a opened this issue Nov 9, 2019 · 13 comments
Labels
bug Did we break something?

Comments

@Abrosimov-a-a
Copy link
Contributor

Abrosimov-a-a commented Nov 9, 2019

Have a problem with show --ascii:

$ dvc pipeline show --ascii evaluate.dvc
ERROR: unexpected error - setupterm: could not find terminal
  • DVC 0.66.9 Debian Buster deb
  • Konsole 18.04.0
  • zsh 5.7.1 (x86_64-debian-linux-gnu)
  • TERM=xterm-256color
@triage-new-issues triage-new-issues bot added the triage Needs to be triaged label Nov 9, 2019
@efiop
Copy link
Contributor

efiop commented Nov 9, 2019

Hi @Abrosimov-a-a ! Thanks for reporting the issue! Could you please run

dvc pipeline show --ascii evaluate.dvc -v

and provide full log for it?

After that, could you please try this workaround

dvc pipeline show --ascii evaluate.dvc | less -S

?

@efiop efiop added awaiting response we are waiting for your reply, please respond! :) bug Did we break something? and removed triage Needs to be triaged labels Nov 9, 2019
@Abrosimov-a-a
Copy link
Contributor Author

Abrosimov-a-a commented Nov 10, 2019

Hi @efiop ! Thanks for helping!

dvc pipeline show --ascii evaluate.dvc -v

Traceback (most recent call last):
  File "dvc/main.py", line 44, in main
  File "dvc/command/pipeline.py", line 140, in run
  File "dvc/command/pipeline.py", line 91, in _show_ascii
  File "dvc/dagascii.py", line 372, in draw
  File "dvc/dagascii.py", line 66, in draw
  File "site-packages/asciimatics/screen.py", line 1337, in wrapper
  File "site-packages/asciimatics/screen.py", line 1292, in open
  File "curses/__init__.py", line 30, in initscr
_curses.error: setupterm: could not find terminal

dvc pipeline show --ascii evaluate.dvc | less -S work is good.

dvc pipeline show --ascii evaluate.dvc working correctly only with the TERM=linux environment variable.

It is an ncurses error, I think.

@efiop efiop removed the awaiting response we are waiting for your reply, please respond! :) label Nov 10, 2019
@efiop
Copy link
Contributor

efiop commented Nov 11, 2019

@Abrosimov-a-a Thanks for the investigation! Might be related to #2420 as well. What ncurses version are you using, btw? I guess, it is the one included with your python, right? Which python version are you using?

@Abrosimov-a-a
Copy link
Contributor Author

My Python version is 3.7.3 with built-in curses version 2.2. I find some information about that. In the next weekend I will try to patch the DVC or report about this bug to the ncurses dev team.

@efiop
Copy link
Contributor

efiop commented Nov 12, 2019

@Abrosimov-a-a I have the same ncurses version. Looks like it is TERM=xterm-256color that is to blame. Ncurses seems to have it mentioned quite a few times in https://invisible-island.net/ncurses/ncurses.faq.html , though I can't put my finger on anything specific just yet. Also, I can't really reproduce the issue even on iterm2 where TERM is xterm-256color by default. So there is something else to it.

@Abrosimov-a-a
Copy link
Contributor Author

Bug is't present in pip version of DVC (0.66.11).

I looked at the source of the deb package. You embed all the dependencies in the package. This is a very bad idea! You include your own Python. In Linux! WTF? I don’t have so much time and desire to figure it out. I assume that the bug appears due to the fact that you are using the Python version without applying Debian patches.

I don’t like it so much that I’m ready to organize package assembly for you. But this does not concern this issue.

@efiop
Copy link
Contributor

efiop commented Nov 16, 2019

@Abrosimov-a-a Ah, I forgot to ask which package you are using. So deb is affected for you, but pip is not, right?

@Abrosimov-a-a
Copy link
Contributor Author

Yes. Deb is affected, but whl is working correctly.

@efiop
Copy link
Contributor

efiop commented Nov 17, 2019

@Abrosimov-a-a Oh, got it. Interesting. So probably the machine we build our deb on has an old ncurses, that is causing this. Thanks for the investigation! 🙏

@efiop
Copy link
Contributor

efiop commented Nov 17, 2019

@Abrosimov-a-a Btw, take a look at #2807 , maybe it is better to implement that instead of bothering with repackaging stuff, even though the repackaging is useful by itself anyway 🙂

@efiop
Copy link
Contributor

efiop commented Nov 17, 2019

@Abrosimov-a-a One more question, why deb was your first choice when installing dvc, why not pip or conda? Related to #2760

@Abrosimov-a-a
Copy link
Contributor Author

@efiop

instead of bothering with repackaging stuff

It's not a Linux way. It's not a Python way. There is no way for appanding to the any Linux distribs.

why deb was your first choice when installing dvc

Because DVC is a system wired tool, not code dependency.

@efiop
Copy link
Contributor

efiop commented Jan 7, 2020

@Abrosimov-a-a Are you still able to reproduce that issue? Should've been fixed by #2807 . Closing for now, please ping us if the issue still persists.

@efiop efiop closed this as completed Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Did we break something?
Projects
None yet
Development

No branches or pull requests

2 participants