-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
DVC version 0.35.7
installed with pip
Running on Windows 10
I have the local dvc cache on drive F: which is a HD, due to limited space on drive C: (SSD), where I have my git repo.
When trying to add some data to DVC control with "dvc add Path\To\Data", where the path to data is a relative path on C: drive, the command exits with the following error.
ERROR: unexpected error - path is on mount 'F:', start on mount 'C:' ------------------------------------------------------------ Traceback (most recent call last): File "c:\users\srg\appdata\local\continuum\anaconda3\envs\tf-keras\lib\site-packages\dvc\main.py", line 37, in main ret = cmd.run_cmd() File "c:\users\srg\appdata\local\continuum\anaconda3\envs\tf-keras\lib\site-packages\dvc\command\base.py", line 60, in run_cmd return self.run() File "c:\users\srg\appdata\local\continuum\anaconda3\envs\tf-keras\lib\site-packages\dvc\command\add.py", line 24, in run fname=self.args.file, File "c:\users\srg\appdata\local\continuum\anaconda3\envs\tf-keras\lib\site-packages\dvc\repo\scm_context.py", line 4, in run result = method(repo, *args, **kw) File "c:\users\srg\appdata\local\continuum\anaconda3\envs\tf-keras\lib\site-packages\dvc\repo\add.py", line 16, in add stages = _create_stages(repo, targets, fname, no_commit) File "c:\users\srg\appdata\local\continuum\anaconda3\envs\tf-keras\lib\site-packages\dvc\repo\add.py", line 51, in _create_stages stage.commit() File "c:\users\srg\appdata\local\continuum\anaconda3\envs\tf-keras\lib\site-packages\dvc\stage.py", line 698, in commit out.commit() File "c:\users\srg\appdata\local\continuum\anaconda3\envs\tf-keras\lib\site-packages\dvc\output\base.py", line 180, in commit self.path_info, self.info File "c:\users\srg\appdata\local\continuum\anaconda3\envs\tf-keras\lib\site-packages\dvc\remote\local.py", line 457, in save msg.format(os.path.relpath(path), os.path.relpath(self.cache_dir)) File "c:\users\srg\appdata\local\continuum\anaconda3\envs\tf-keras\lib\ntpath.py", line 584, in relpath path_drive, start_drive)) ValueError: path is on mount 'F:', start on mount 'C:'
As pointed out by Ruslan in a response to my support email:
the issue is that dvc is trying to find a relpath between C: and F: paths, which doesn't exist on windows. It is a known issue with
os.relpath
[1] . Luckily, that relpath is only needed for a debug message in our case, so we should be able to find a workaround for it.
I did try the same thing on an Ubuntu 18.04 machine, with the local cache on a different drive than the git repo and the "dvc add" command ran without any issues.