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

list: raises an ugly exception on a dir path #3776

Closed
shcheklein opened this issue May 10, 2020 · 6 comments
Closed

list: raises an ugly exception on a dir path #3776

shcheklein opened this issue May 10, 2020 · 6 comments
Labels
bug Did we break something? triage Needs to be triaged

Comments

@shcheklein
Copy link
Member

Note: this is pre-release testing.

DVC version: 1.0.0a1+666e20
Python version: 3.7.7
Platform: Darwin-18.2.0-x86_64-i386-64bit
Binary: False
Package: None
Supported remotes: azure, gdrive, gs, hdfs, http, https, s3, ssh, oss
Cache: reflink - supported, hardlink - supported, symlink - supported
Filesystem type (cache directory): ('apfs', '/dev/disk1s1')
Repo: dvc, git
Filesystem type (workspace): ('apfs', '/dev/disk1s1')

On the example-get-started:

(.env) [ivan@ivan ~/Projects/example-repos-dev/example-get-started/build/example-get-started]$ dvc list . data/features
ERROR: failed to list '.' - The path 'data/features' does not exist in the target repository 'ExternalRepo: '/private/var/folders/_1/dxrf7_f15sn4r01jvqvr5b6h0000gn/T/tmpmvo7qgk1dvc-erepo'' neither as a DVC output nor as a Git-tracked file.

while listing of a single output works fine:

(.env) [ivan@ivan ~/Projects/example-repos-dev/example-get-started/build/example-get-started]$ dvc list . data/data.xml
data.xml

Problems:

  1. Message reveals a lot of internal info that is not relevant.
  2. Directory actually exists. At least we should show its name if not the full content.
@triage-new-issues triage-new-issues bot added the triage Needs to be triaged label May 10, 2020
@pmrowla
Copy link
Contributor

pmrowla commented May 11, 2020

I think this may end up being fixed after the ls changes in #3716

@jorgeorpinel jorgeorpinel added the bug Did we break something? label Sep 8, 2020
@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented Sep 8, 2020

Hi! This error got worst it seems.

λ dvc list .
ERROR: unexpected error - 'none'

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
Traceback (most recent call last):
  File "shutil.py", line 402, in _rmtree_unsafe
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\usr\\AppData\\Local\\Temp\\tmpcuw5fhqddvc-clone'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "dvc\__main__.py", line 7, in <module>
  File "dvc\main.py", line 127, in main
  File "dvc\external_repo.py", line 71, in clean_repos
  File "dvc\external_repo.py", line 368, in _remove
  File "site-packages\funcy\decorators.py", line 39, in wrapper
  File "site-packages\funcy\flow.py", line 122, in retry
  File "site-packages\funcy\decorators.py", line 60, in __call__
  File "dvc\utils\fs.py", line 136, in remove
  File "shutil.py", line 516, in rmtree
  File "shutil.py", line 404, in _rmtree_unsafe
  File "dvc\utils\fs.py", line 121, in _chmod
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\usr\\AppData\\Local\\Temp\\tmpcuw5fhqddvc-clone'
[21952] Failed to execute script __main__

Plus a possibly Windows-specific exception there ^ (can you guys try from another OS?)

λ dvc version
DVC version: 1.6.1 (exe)
---------------------------------
Platform: Python 3.7.5 on Windows-10-10.0.18362-SP0
Supports: All remotes
Cache types: hardlink
Cache directory: NTFS on C:\
Workspace directory: NTFS on C:\
Repo: dvc, git

@jorgeorpinel
Copy link
Contributor

Is this a duplicate of #3590? They can probably be merged.

@efiop
Copy link
Contributor

efiop commented Sep 8, 2020

Plus a possibly Windows-specific exception there ^ (can you guys try from another OS?)

Not able to reproduce. Need to take a closer look at windows.

@efiop
Copy link
Contributor

efiop commented Sep 8, 2020

Is this a duplicate of #3590? They can probably be merged.

Doesn't look like a duplicate.

@efiop
Copy link
Contributor

efiop commented Oct 8, 2021

We are now able to handle local paths gracefully and don't use ExternalRepo anymore. Closing

@efiop efiop closed this as completed Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Did we break something? triage Needs to be triaged
Projects
None yet
Development

No branches or pull requests

4 participants