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

import: cryptic, confusing error output #2602

Closed
1 of 4 tasks
jorgeorpinel opened this issue Oct 12, 2019 · 7 comments
Closed
1 of 4 tasks

import: cryptic, confusing error output #2602

jorgeorpinel opened this issue Oct 12, 2019 · 7 comments
Assignees
Labels
enhancement Enhances DVC p2-medium Medium priority, should be done, but less important ui user interface / interaction

Comments

@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented Oct 12, 2019

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 \               
           [email protected]:iterative/dataset-registry.git \
           invalid/path       
Importing 'invalid/path ([email protected]:iterative/dataset-registry.git)' -> 'path'
ERROR: failed to import 'invalid/path' from '[email protected]: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?
@jorgeorpinel jorgeorpinel added enhancement Enhances DVC ui user interface / interaction labels Oct 12, 2019
@jorgeorpinel jorgeorpinel changed the title import: cryptic, confusing output import: cryptic, confusing error output Oct 12, 2019
@efiop efiop added the p1-important Important, aka current backlog of things to do label Oct 14, 2019
@pared pared self-assigned this Nov 11, 2019
@jorgeorpinel
Copy link
Contributor Author

except for the super long, random-looking path... I don't think it will mean anything to people.

This seems like it will be fixed with #2777.

@pared pared mentioned this issue Nov 27, 2019
@pared
Copy link
Contributor

pared commented Mar 5, 2020

@jorgeorpinel Ok, I am trying to clean up my assigned log. And got back to this issue.
I prepared reproduction script:

#!/bin/bash

rm -rf repo data-reg storage
mkdir repo data-reg

main=$(pwd)

pushd data-reg
git init --quiet
dvc init -q

set -ex

mkdir data
echo data >> data/1

dvc add data
# dvc remote add -d str $main/storage
# dvc push
git add -A
git commit -am "init"

rm -rf .dvc/cache

popd
pushd repo

git init --quiet
dvc init -q

dvc import ../data-reg data

Which I believe resembles your original issue (point 2 and 3). I try to import data from data-reg, while, there is no remote and cache has been removed.

Here are the results:

  1. When going for n
    asciicast

Warning: I believe this prompt is unnecessary, also those path are uninformative.
Error: better than it used to be but we need without cache for directory: 'data' and not this full tmp path.

  1. When going for y:
    asciicast

1st Warning: same as before
2nd Warning: not necessary
3rd Warning: might be useful if it was more like Cannot find cache for data``
Error: plainly wrong, as it is defined as output but its not cached.

What I think is we should investigate why there is the prompt, and proceed from there.

@jorgeorpinel
Copy link
Contributor Author

Thanks for the update @pared, sounds like a good plan.

@dberenbaum
Copy link
Collaborator

@pared I'm unable to reproduce the prompts at this point, but the long temporary paths still show in output in 2.9.5:

$ dvc import [email protected]:iterative/dataset-registry.git invalid/path
Importing 'invalid/path ([email protected]:iterative/dataset-registry.git)' -> 'path'
ERROR: failed to import 'invalid/path' from '[email protected]:iterative/dataset-registry.git'. - The path 'invalid/path' does not exist in the target repository '[email protected]:iterative/dataset-registry.git' neither as a DVC output nor as a Git-tracked file.: [Errno 2] No such file or directory: '/private/var/folders/24/99_tf1xj3vx8k1k_jkdmnhq00000gn/T/tmpfsrprep6dvc-clone/invalid/path'

Any thoughts on how to address this or priority of it?

@dberenbaum dberenbaum added p2-medium Medium priority, should be done, but less important and removed p1-important Important, aka current backlog of things to do labels Apr 5, 2022
@dberenbaum
Copy link
Collaborator

@pared ping about this. I'm lowering the priority for now. Let me know if you think we need to address.

@pared
Copy link
Contributor

pared commented Apr 5, 2022

@dberenbaum Sorry. p2 is appropriate, I need to get back to this once I clean up my plate a bit.

@efiop
Copy link
Contributor

efiop commented Dec 8, 2023

closing as stale.

@efiop efiop closed this as completed Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhances DVC p2-medium Medium priority, should be done, but less important ui user interface / interaction
Projects
None yet
Development

No branches or pull requests

4 participants