Dvc: get: relpath in error message for inexistent `path` is not nice

Created on 23 Aug 2019  ·  7Comments  ·  Source: iterative/dvc

UPDATE: See https://github.com/iterative/dvc/issues/2430#issuecomment-524546265


Example:

$ dvc get https://github.com/iterative/dvc.org \
          I-dont-exist.zip
ERROR: failed to get ' ' from 'https://github.com/iterative/dvc.org' - you are not
inside of a dvc repository (checked up to mount point '/')
...

Note that https://github.com/iterative/dvc.org is NOT a DVC project.

First of all, the command takes a long time to error out.

Also, you are not inside of a dvc repository? I thought dvc get "doesn't require an existing DVC project to run in", at least according to our docs (which I wrote 😋).

DVC version: 0.57.0
Python version: 3.7.3
Platform: Darwin-18.7.0-x86_64-i386-64bit
Binary: False
Filesystem type (workspace): ('apfs', '/dev/disk1s1')

Maybe related to #2309

bug good first issue p1-important ui

Most helpful comment

Its because https://github.com/iterative/dataset-registry became dvc repository 3 days ago.

try:

dvc get https://github.com/iterative/dvc.org \         
          I-dont-exist.zip

All 7 comments

It seems to me that NoDvcRepoError should be intercepted here and treated differently than "normal" NoDvcRepo

Not able to reproduce this

(3.7.0-dvc) ➜  sfd dvc get https://github.com/iterative/dataset-registry I-dont-exist.zip                                                                                   
ERROR: failed to get 'I-dont-exist.zip' from 'https://github.com/iterative/dataset-registry' - unable to find DVC-file with output '../tmpuig76zzhdvc-repo/I-dont-exist.zip'

Having any troubles?. Hit us up at https://dvc.org/support, we are always happy to help!                                                                                    

The relpath in the error msg is not really nice though.

I can confirm this is no longer happening to me either 🤷‍♂ Updated title and description of issue.

Its because https://github.com/iterative/dataset-registry became dvc repository 3 days ago.

try:

dvc get https://github.com/iterative/dvc.org \         
          I-dont-exist.zip

Thanks Pawel. I guess what happened is that https://github.com/iterative/dataset-registry used to be empty when I reported this. And since, I have actually populated it with an actual DVC repo. So this is a valid issue after all! I'll update the description and hide outdated comments.

Isse still exists, investigating

EDIT:
My bad, didnt noticed that Cmd handler joins messages

Reopenning to address non-existent output error in https://github.com/iterative/dvc/pull/2435

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  ·  3Comments

analystanand picture analystanand  ·  3Comments

siddygups picture siddygups  ·  3Comments

dnabanita7 picture dnabanita7  ·  3Comments

gregfriedland picture gregfriedland  ·  3Comments