dvc metrics: show metrics across branches fails with file does not exist

Created on 15 Apr 2019  路  4Comments  路  Source: iterative/dvc

DVC version 0.35.7

dvc metrics show -a -v 
ERROR: failed to show metrics - 'data/data-2010-2016.h5.dvc' does not exist.
------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/frag/miniconda3/envs/generic-dev/lib/python3.6/site-packages/dvc/command/metrics.py", line 47, in run
    recursive=self.args.recursive,
  File "/Users/frag/miniconda3/envs/generic-dev/lib/python3.6/site-packages/dvc/repo/metrics/__init__.py", line 18, in show
    return show(self.repo, *args, **kwargs)
  File "/Users/frag/miniconda3/envs/generic-dev/lib/python3.6/site-packages/dvc/repo/metrics/show.py", line 262, in show
    entries = _collect_metrics(self, path, recursive, typ, xpath, branch)
  File "/Users/frag/miniconda3/envs/generic-dev/lib/python3.6/site-packages/dvc/repo/metrics/show.py", line 168, in _collect_metrics
    outs = [out for stage in self.stages() for out in stage.outs]
  File "/Users/frag/miniconda3/envs/generic-dev/lib/python3.6/site-packages/dvc/repo/__init__.py", line 398, in stages
    stage = Stage.load(self, path)
  File "/Users/frag/miniconda3/envs/generic-dev/lib/python3.6/site-packages/dvc/stage.py", line 564, in load
    Stage._check_file_exists(repo, fname)
  File "/Users/frag/miniconda3/envs/generic-dev/lib/python3.6/site-packages/dvc/stage.py", line 541, in _check_file_exists
    raise StageFileDoesNotExistError(fname)
dvc.stage.StageFileDoesNotExistError: 'data/data-2010-2016.h5.dvc' does not exist.
------------------------------------------------------------

Having any troubles?. Hit us up at https://dvc.org/support, we are always happy to help!
DEBUG: Analytics is enabled.
DEBUG: Trying to spawn '['/Users/frag/miniconda3/envs/generic-dev/bin/python', '-m', 'dvc', 'daemon', '-q', 'analytics', '/var/folders/q3/7kp92vs15tjc1gc7413rw5mm0000gn/T/tmp730_03qg']'
DEBUG: Spawned '['/Users/frag/miniconda3/envs/generic-dev/bin/python', '-m', 'dvc', 'daemon', '-q', 'analytics', '/var/folders/q3/7kp92vs15tjc1gc7413rw5mm0000gn/T/tmp730_03qg']'
bug c3-small-fix p1-important

Most helpful comment

Turns out @fgadaleta had to cd to root of repo, then problem disappeared. When fixing we should either gather metrics starting with root and not cwd or display some more meaningful error.

All 4 comments

Turns out @fgadaleta had to cd to root of repo, then problem disappeared. When fixing we should either gather metrics starting with root and not cwd or display some more meaningful error.

@pared Clearly for dvc metrics show -a it is implied that we are collecting metrics for the whole repo, and we indeed do that, but we don't take cwd into account when trying to read stage files, which is where the issue comes from.

@fgadaleta The fix has been released in 0.40.0. Please upgrade 馃檪

Was this page helpful?
0 / 5 - 0 ratings