dvc: "Error: Failed to pull data from the cloud" when pulled data is a directory
When pulling data from remote storage, I execute the following command:
dvc pull train.dvc
with content of the file: train.dvc
cmd: python train.py
deps:
- md5: 454410a0e96e7c268914287865e94bbc
path: data/dataset.csv
md5: c1b4f121d34f4dbd426089bbbec26d3c
outs:
- cache: true
md5: 9f1f44cc23e76e794f7423d4a76147a3.dir
path: outputs/models/
Then obtain the following error:
[##############################] 100% Collecting information
[##############################] 100% outputs/models
[##############################] 100% Collecting information
(1/3): [##############################] 100% outputs/models/task_a.pkl
(2/3): [##############################] 100% outputs/models/task_b.pkl
(3/3): [##############################] 100% outputs/models/task_c.pkl
Checking out ' outputs/models' with cache '9f1f44cc23e76e794f7423d4a76147a3.dir'.
Linking directory 'outputs/models'.
Error: Failed to pull data from the cloud: stat: path should be string, bytes, os.PathLike or integer, not NoneType
It seems that it happens because of the output of train.dvc
is a directory. It works fine when itโs a file.
some infos: dvc==0.21.0 installed with pip macOS 10.14
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (7 by maintainers)
@efiop , Seems like the issue might be because unintentionally my Mac system create an empty file called
Icon
and DVC was tracking that butgdrive
failed to track it as it was empty & hence duringdvc pull
DVC could not pull the Icon file as it was not in my gdrive remote. Let me test this and see if I am correct.Thanks to @mroutis for a lightning fast โก fix! 0.21.2 is out, please upgrade. ๐
@imflash217 @we-taper Created https://github.com/iterative/dvc/issues/4286 . Letโs move the discussion there. Thanks for the feedback!
@guerrapin Looks like an unrelated issue. Could you please create a new issue for it so we could continue there? Please provide full error too with
dvc pull -v
.Got the same the problem. The update fixed it and everything works perfectly. thanks ๐๐ผ
Iโm blown away. 0.21.2 really fixed it. Thanks a lot โฆ youโre lighning fast! Do you guys ever sleep? ๐
Thanks for reporting the errors, @guerrapin, @stvogel, it was very helpful! ๐
I submitted a patch at https://github.com/iterative/dvc/pull/1378 and hope to release it today.
A work around for this could be using the
--force
option, just making sure your working directory is not dirty (with changes that could be overwritten or removed when thecheckout
happends; always be careful when using the--force
).Got the same error, if it helps here is the output from
dvc pull -v
With data.dvc containing: