Skip to content

import: cryptic, confusing error output #2602

@jorgeorpinel

Description

@jorgeorpinel

Splitting from other issues. See #2599 (comment) and #2600 (comment)

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

A few problems in error output from dvc import:
1.

$ dvc import \               
           git@github.com:iterative/dataset-registry.git \
           invalid/path       
Importing 'invalid/path (git@github.com:iterative/dataset-registry.git)' -> 'path'
ERROR: failed to import 'invalid/path' from 'git@github.com:iterative/dataset-registry.git'. - unable to find DVC-file with output '../../../../private/var/folders/_c/3mt_xn_d4xl2ddsx2m98h_r40000gn/T/tmpxczzy97tdvc-repo/invalid/path'

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
  • Here the output doesn'e exist so the output is actually good, except for the super long, random-looking path ..._c/3mt_xn_d4xl2ddsx2m98h_r40000gn/T/tmpxczzy97tdvc.... Is that necssary? I don't think it will mean anything to people.
$ dvc import ../data-reg-test data
Importing 'data (../data-reg-test)' -> 'data'
Missing cache for directory '../../../../private/var/folders/_c/3mt_xn_d4xl2ddsx2m98h_r40000gn/T/tmpons_rplmdvc-repo/data'. Cache for files inside will be lost. Would you like to continue? Use '-f' to force. [y/n] n
ERROR: failed to import 'data' from '../data-reg-test'. - unable to fully collect used cache without cache for directory '../../../../private/var/folders/_c/3mt_xn_d4xl2ddsx2m98h_r40000gn/T/tmpons_rplmdvc-repo/data'
...
  • Here we have the same random-looking path issue, but also there's a prompt that seems to refer to that path, and it seems to me its impossible to know what the implications of answering y vs n are.
  • I went for n above (safe approach), and another hard-to-understand ERROR message comes out. unable to fully collect used cache without cache for directory??? Perhaps just say "Import cancelled by user." as a regular INFO log?
$ dvc import ../data-reg-test data
...
Cache for files inside will be lost. Would you like to continue? Use '-f' to force. [y/n] y
ERROR: failed to import 'data' from '../data-reg-test'. - config file error: no remote specified. Setup default remote with
    dvc config core.remote <name>
or use:
    dvc pull -r <name>


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

This is the same command as the previous example, but I went for y. This error msg is better because it tells me what the problem is (the DVC repo in ./data-reg-test doesn't have a remote – refer to #2599 BTW).

  • The only problem here is that the Enter after y causes 2 new lines before Having any troubles? .... Any way to avoid this?

Metadata

Metadata

Assignees

Labels

enhancementEnhances DVCp2-mediumMedium priority, should be done, but less importantuiuser interface / interaction

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions