Skip to content
Latchkey

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

  1. Verify the exact path in the source repo with dvc list.
  2. Fix the path or pin a --rev that contains the file.
  3. 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.0

Pin 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 9f3c2a1

How to prevent it

  • Verify source paths with dvc list before importing.
  • Pin imports to a tag or commit, not a moving branch.
  • Update .dvc import pointers when the source path changes.

Frequently asked questions

What causes ""Path ... does not exist""?
The file was renamed, deleted, or lives at a different path in the source repository than the import specifies.
How do I fix "Path ... does not exist"?
Correct the path and revision

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card