The command that you have for file2 is correct.
dvc list --dvc-only -R .
:
data/test/file1.pq.gz
data/test/file2.pq.gz
dvc doctor
:
DVC version: 2.1.0 (pip)
---------------------------------
Platform: Python 3.6.8 on Linux-3.10.0-1160.6.1.el7.x86_64-x86_64-with-centos-7.9.2009-Core
Supports: http, https
Cache types: hardlink, symlink
Cache directory: nfs4 on remote.storage.inside.network.com:/nas
Caches: local
Remotes: None
Workspace directory: nfs4 on remote.storage.inside.network.com:/nas
Repo: dvc, git
dvc import -v
:
[user2@/nas/projects/project1/code/user2/dvc_test]$ env/bin/dvc import -v ../../user1/repo1/ data/test/file1.pq.gz
2021-05-24 13:43:44,940 DEBUG: Check for update is enabled.
2021-05-24 13:43:46,927 DEBUG: Removing output 'file1.pq.gz' of stage: 'file1.pq.gz.dvc'.
2021-05-24 13:43:46,927 DEBUG: Removing 'file1.pq.gz'
Importing 'data/test/file1.pq.gz (../../user1/repo1/)' -> 'file1.pq.gz'
2021-05-24 13:43:46,934 DEBUG: Computed stage: 'file1.pq.gz.dvc' md5: '7e562729f1306769a103b98c4705df2a'
2021-05-24 13:43:46,934 DEBUG: 'md5' of stage: 'file1.pq.gz.dvc' changed.
2021-05-24 13:43:46,936 DEBUG: Creating external repo ../../user1/repo1/@None
2021-05-24 13:43:46,937 DEBUG: erepo: git clone '../../user1/repo1/' to a temporary dir
2021-05-24 13:43:48,371 DEBUG: Checking if stage '/tmp/tmp3hsesjwmdvc-clone/data/test/file1.pq.gz' is in 'dvc.yaml'
2021-05-24 13:43:48,373 DEBUG: Assuming '/tmp/tmp3hsesjwmdvc-clone/data/test/file1.pq.gz' to be a stage inside 'dvc.yaml'
2021-05-24 13:43:48,428 ERROR: unexpected error - [Errno 2] No such file or directory: PosixPathInfo: '../../../../../../../../tmp/tmp3hsesjwmdvc-clone/data/test/file1.pq.gz'
------------------------------------------------------------
Traceback (most recent call last):
File "/nas/projects/project1/code/user2/dvc_test/env/lib64/python3.6/site-packages/dvc/main.py", line 55, in main
ret = cmd.run()
File "/nas/projects/project1/code/user2/dvc_test/env/lib64/python3.6/site-packages/dvc/command/imp.py", line 22, in run
jobs=self.args.jobs,
File "/nas/projects/project1/code/user2/dvc_test/env/lib64/python3.6/site-packages/dvc/repo/imp.py", line 7, in imp
path, out=out, fname=fname, erepo=erepo, frozen=True, **kwargs
File "/nas/projects/project1/code/user2/dvc_test/env/lib64/python3.6/site-packages/dvc/repo/__init__.py", line 49, in wrapper
return f(repo, *args, **kwargs)
File "/nas/projects/project1/code/user2/dvc_test/env/lib64/python3.6/site-packages/dvc/repo/scm_context.py", line 14, in run
return method(repo, *args, **kw)
File "/nas/projects/project1/code/user2/dvc_test/env/lib64/python3.6/site-packages/dvc/repo/imp_url.py", line 80, in imp_url
stage.run(jobs=jobs)
File "/nas/projects/project1/code/user2/dvc_test/env/lib64/python3.6/site-packages/funcy/decorators.py", line 45, in wrapper
return deco(call, *dargs, **dkwargs)
File "/nas/projects/project1/code/user2/dvc_test/env/lib64/python3.6/site-packages/dvc/stage/decorators.py", line 36, in rwlocked
return call()
File "/nas/projects/project1/code/user2/dvc_test/env/lib64/python3.6/site-packages/funcy/decorators.py", line 66, in __call__
return self._func(*self._args, **self._kwargs)
File "/nas/projects/project1/code/user2/dvc_test/env/lib64/python3.6/site-packages/dvc/stage/__init__.py", line 512, in run
sync_import(self, dry, force, jobs)
File "/nas/projects/project1/code/user2/dvc_test/env/lib64/python3.6/site-packages/dvc/stage/imports.py", line 47, in sync_import
stage.deps[0].download(stage.outs[0], jobs=jobs)
File "/nas/projects/project1/code/user2/dvc_test/env/lib64/python3.6/site-packages/dvc/dependency/repo.py", line 103, in download
follow_subrepos=False,
File "/nas/projects/project1/code/user2/dvc_test/env/lib64/python3.6/site-packages/dvc/objects/stage.py", line 180, in stage
errno.ENOENT, os.strerror(errno.ENOENT), path_info
FileNotFoundError: [Errno 2] No such file or directory: PosixPathInfo: '../../../../../../../../tmp/tmp3hsesjwmdvc-clone/data/test/file1.pq.gz'
------------------------------------------------------------
2021-05-24 13:43:49,272 DEBUG: Version info for developers:
DVC version: 2.1.0 (pip)
---------------------------------
Platform: Python 3.6.8 on Linux-3.10.0-1160.6.1.el7.x86_64-x86_64-with-centos-7.9.2009-Core
Supports: http, https
Cache types: hardlink, symlink
Cache directory: nfs4 on remote.storage.inside.network.com:/nas
Caches: local
Remotes: None
Workspace directory: nfs4 on remote.storage.inside.network.com:/nas
Repo: dvc, git
Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
2021-05-24 13:43:49,276 DEBUG: Analytics is enabled.
2021-05-24 13:43:49,421 DEBUG: Trying to spawn '['daemon', '-q', 'analytics', '/tmp/tmpug76kojt']'
2021-05-24 13:43:49,422 DEBUG: Spawned '['daemon', '-q', 'analytics', '/tmp/tmpug76kojt']'
I tried recreating the issue with two new repositories and could not reproduce the issue. I created this dvc_test repository and ran the following script to initialize the repository before running dvc import:
git init
python3 -m venv env
env/bin/pip install pip --upgrade
env/bin/pip install dvc
env/bin/dvc init
env/bin/dvc cache dir ../../../../data/dvc/
env/bin/dvc config cache.shared group
On a hunch, I tried activating the environment and running dvc import
instead of env/bin/dvc import
and received the same error. dvc doctor
in repo1 looks the same as repo2 except repo1 has version 2.0.5. The relative path in the PosixPathInfo goes down to /tmp.