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

Make dvc pull error message clearer when there is a downloading problem #10252

Open
parmentf opened this issue Jan 23, 2024 · 1 comment
Open
Labels
research ui user interface / interaction

Comments

@parmentf
Copy link

parmentf commented Jan 23, 2024

When using a webdav remote, and you don't provide the right credentials, the error provided by DVC is not clear:

$ dvc pull --allow-missing -v
2024-01-19 14:39:17,317 DEBUG: v3.39.0 (pip), CPython 3.9.18 on Linux-6.2.0-1018-azure-x86_64-with-glibc2.31
2024-01-19 14:39:17,318 DEBUG: command: /usr/local/bin/dvc pull --allow-missing -v
2024-01-19 14:39:18,440 DEBUG: Preparing to transfer data from 'https://webdav.example.com/dvc/files/md5' to '/dvc/.dvc/cache/files/md5'
2024-01-19 14:39:18,441 DEBUG: Preparing to collect status from '/dvc/.dvc/cache/files/md5'
2024-01-19 14:39:18,441 DEBUG: Collecting status from '/dvc/.dvc/cache/files/md5'
2024-01-19 14:39:18,443 DEBUG: Preparing to collect status from 'files/md5'
2024-01-19 14:39:18,443 DEBUG: Collecting status from 'files/md5'
2024-01-19 14:39:18,444 DEBUG: Querying 1 oids via object_exists
2024-01-19 14:39:18,535 WARNING: Some of the cache files do not exist neither locally nor on remote. Missing cache files:
md5: e86afa670ff4bc8199bbee0600deb77c
2024-01-19 14:39:18,541 DEBUG: failed to create '/dvc/annulled.csv' from '/dvc/.dvc/cache/files/md5/e8/6afa670ff4bc8199bbee0600deb77c' - [Errno 2] No such file or directory: '/dvc/.dvc/cache/files/md5/e8/6afa670ff4bc8199bbee0600deb77c'
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dvc_objects/fs/generic.py", line 330, in transfer
    _try_links(
  File "/usr/local/lib/python3.9/site-packages/dvc_objects/fs/generic.py", line 272, in _try_links
    _link(link, from_fs, from_path, to_fs, to_path)
  File "/usr/local/lib/python3.9/site-packages/dvc_objects/fs/generic.py", line 62, in _link
    func(from_path, to_path)
  File "/usr/local/lib/python3.9/site-packages/dvc_objects/fs/base.py", line 497, in reflink
    return self.fs.reflink(from_info, to_info)
  File "/usr/local/lib/python3.9/site-packages/dvc_objects/fs/local.py", line 166, in reflink
    return system.reflink(path1, path2)
  File "/usr/local/lib/python3.9/site-packages/dvc_objects/fs/system.py", line 91, in reflink
    src_fd = os.open(src, os.O_RDONLY)
FileNotFoundError: [Errno 2] No such file or directory: '/dvc/.dvc/cache/files/md5/e8/6afa670ff4bc8199bbee0600deb77c'

No means to know that it's a credential problem.

Using curl, I got a clearer message, saying that the user was not authorized (and a 401 HTTP error).

The webdav error should be used to forge a message stating that the user is not authorized.

See #10102 (comment)

@dberenbaum dberenbaum added the ui user interface / interaction label Jan 23, 2024
@dberenbaum
Copy link
Collaborator

@iterative/dvc Thoughts on how we can handle these types of errors?

@dberenbaum dberenbaum added this to DVC Jan 23, 2024
@github-project-automation github-project-automation bot moved this to Backlog in DVC Jan 23, 2024
@skshetry skshetry self-assigned this Jan 30, 2024
@dberenbaum dberenbaum added the p1-important Important, aka current backlog of things to do label Feb 6, 2024
@skshetry skshetry removed their assignment Mar 4, 2024
@dberenbaum dberenbaum removed the p1-important Important, aka current backlog of things to do label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
research ui user interface / interaction
Projects
No open projects
Archived in project
Development

No branches or pull requests

3 participants