dvc: dvc: invisible stderr ERROR message in some terminals?

UPDATE: I’m using Git Bash (via std. Cmder) on Windows UPDATE: Go to https://github.com/iterative/dvc/issues/3902#issuecomment-636106003

Bug Report

λ dvc run -n test2 -d output.data -o out-short.data head output.data > out-short.data
ERROR

The error is that I’m not wrapping the command in quotes but the output is just ERROR.

Please provide information about your setup

Output of dvc version:

λ dvc version
DVC version: 1.0.0a6+283718
Python version: 3.8.2
Platform: Windows-10-10.0.18362-SP0
Binary: False
Package: None
Supported remotes: azure, gdrive, gs, hdfs, http, https, s3, ssh, oss
Cache: reflink - not supported, hardlink - supported, symlink - supported
Filesystem type (cache directory): ('NTFS', 'C:\\')
Repo: dvc, git
Filesystem type (workspace): ('NTFS', 'C:\\')

Additional Information (if any):

If applicable, please also provide a --verbose output of the command, eg: dvc add --verbose.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (14 by maintainers)

Most upvoted comments

I think the issue is more or less with Maximus5/ConEmu here.

Sorry for the delay @skshetry. Both outputs are visible:

First one demonstrates that stderr are correctly shown by term. Second one demonstrates that stderr is correctly prepared by dvc, and supported by terminal.

Looks like ANSI Escape sequences + stream redirection is buggy on the terminal.

@majidaldo Btw, do you use https://pre-commit.com/ ? If so, could you give it a shot with dvc install --use-pre-commit-tool and see if that helps?

Well, I can tell you that you have to have a valid .pre-commit-config.yaml (already) before you can use --use-pre-commit-tool. It should error out with something like: .pre-commit-config.yaml not found.

starting to use it. seems to be working. works even in my interoperating conda envs (though i know what i’m doing).

This isn’t with conemu. Happens in cmd.exe too. In my case it happens with the git hooks. I changed the hooks to redirect stderr like exec dvc git-hook pre-commit $@ 2>%1 so now it’s visible.

Oddly, if my terminal widh is 80 chars or less, I can still see it.

ref https://conemu.github.io/en/MicrosoftBugs.html#ErasedWindows10

OK np should we open an issue in their repo and close this?

I’d leave that up to you. 😉

Wait… the stderr is there! But I have to select it:

image

image

so the original bug report is invalid.

However maybe there’s a problem with the output coloring?

@efiop, I am not able to reproduce that. I am getting the error message, so, I am waiting for @jorgeorpinel to respond with more information.

@skshetry But error should go to stderror and not to stdout. Why are we only getting the prefix?