diff --git a/dvc/project.py b/dvc/project.py index 5763bc2c7..a93a8abbf 100644 --- a/dvc/project.py +++ b/dvc/project.py @@ -1023,6 +1023,9 @@ class Project(object): self._metrics_modify(path, typ, xpath) def metrics_add(self, path, typ=None, xpath=None): + if not os.path.exists(path): + raise DvcException('File does not exist'.format(path)) + if not typ: typ = 'raw' self._metrics_modify(path, typ, xpath)