iterative / dvc

🦉 Data Versioning and ML Experiments
https://dvc.org
Apache License 2.0
13.86k stars 1.19k forks source link

Dvc pull Crashes on Windows #10512

Closed nexmann closed 2 weeks ago

nexmann commented 3 months ago

Description

I am trying to pull from a DVC repository created on Linux on a Windows machine, and it fails while trying to delete the temporary git repository, with an [WinError 5] Access Denied:

2024-08-08 07:54:42,144 DEBUG: Removing 'C:\Users\RADIOB~1\AppData\Local\Temp\2\tmpv2n2lbjwdvc-clone'
2024-08-08 07:54:42,144 WARNING: Failed to remove '..\..\..\..\RADIOB~1\AppData\Local\Temp\2\tmpv2n2lbjwdvc-clone' - [WinError 5] Access is denied: 'C:\\Users\\RADIOB~1\\AppData\\Local\\Temp\\2\\tmpv2n2lbjwdvc-clone\\.git\\objects\\pack\\pack-582a2a0da5aaefca17e8ffe5c94243a52b6bb10e.idx'
Traceback (most recent call last):
  File "C:\Users\radiobotics\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 632, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\RADIOB~1\\AppData\\Local\\Temp\\2\\tmpv2n2lbjwdvc-clone\\.git\\objects\\pack\\pack-582a2a0da5aaefca17e8ffe5c94243a52b6bb10e.idx'

The program seems to be unable to remove the temporary files correctly. I have followed the Windows for DVC guide and enabled long file paths.

This is version info:

DVC version: 3.53.1 (pip)
-------------------------
Platform: Python 3.11.9 on Windows-10-10.0.20348-SP0
Subprojects:
        dvc_data = 3.15.2
        dvc_objects = 5.1.0
        dvc_render = 1.0.2
        dvc_task = 0.4.0
        scmrepo = 3.3.7
Supports:
        azure (adlfs = 2024.4.1, knack = 0.11.0, azure-identity = 1.14.1),
        http (aiohttp = 3.9.5, aiohttp-retry = 2.8.3),
        https (aiohttp = 3.9.5, aiohttp-retry = 2.8.3)
Config:
        Global: C:\Users\radiobotics\AppData\Local\iterative\dvc
        System: C:\ProgramData\iterative\dvc
Cache types: <https://error.dvc.org/no-dvc-cache>
Caches: local
Remotes: None
Workspace directory: NTFS on C:\
Repo: dvc, git
Repo.site_cache_dir: C:\ProgramData\iterative\dvc\Cache\repo\6ad440712433f069a0c62ef51df329b8

Version Info

No response

shcheklein commented 2 months ago

Hmm, that's a bit weird. Does it happen when you do a basic (dvc import) as well?

What env environment are you using on Windows to run it (conda?).

Do you have any firewalls, anti-viruses on Win?

shcheklein commented 2 weeks ago

Closing as stale