DVC "Path ... does not exist" (dvc get / dvc import) in CI
dvc get or dvc import pulls a path from another DVC repository. If that path does not exist at the referenced revision, or the URL/rev is wrong, DVC reports "Path ... does not exist".
What this error means
dvc get or dvc import fails with "failed to import/get" and "Path '...' does not exist" naming the source path.
dvc
ERROR: failed to import 'data/train.csv' from 'https://github.com/org/data-repo'.
Path 'data/train.csv' does not exist in the DVC repository.Common causes
The path is wrong or moved in the source repo
The file was renamed, deleted, or lives at a different path in the source repository than the import specifies.
The referenced revision does not have the file
The --rev (branch, tag, or commit) predates the file, so it does not exist at that point in history.
How to fix it
Correct the path and revision
- Verify the exact path in the source repo with
dvc list. - Fix the path or pin a
--revthat contains the file. - Re-run the get/import.
Terminal
dvc list https://github.com/org/data-repo data
dvc import https://github.com/org/data-repo data/train.csv --rev v1.2.0Pin an immutable revision
Reference a tag or commit so the imported path stays stable in CI.
Terminal
dvc import https://github.com/org/data-repo data/train.csv --rev 9f3c2a1How to prevent it
- Verify source paths with
dvc listbefore importing. - Pin imports to a tag or commit, not a moving branch.
- Update
.dvcimport pointers when the source path changes.
Related guides
DVC "unable to find DVC remote" in CIFix DVC "ERROR: unable to find DVC remote" in CI - dvc pull/push has no default remote configured, or the nam…
DVC "Failed to collect ... missing cache" in CIFix DVC "ERROR: Failed to collect ... missing cache files" in CI - the .dvc metadata references objects that…
DVC "unable to read ... .dvc file" in CIFix DVC "ERROR: unable to read" a .dvc file in CI - a tracking file is corrupt, truncated, or was mangled by…