Failed to run command: Stage 'file.tsv.dvc' cmd failed


#1

HI,

i am trying the example with Ref given below. When running the below command i am getting this error “/c: /c: Is a directory”
Tool used : running via gitbash

dvc run -d data/Posts.xml -d code/xml_to_tsv.py -d code/conf.py \ -o data/Posts.tsv \ python code/xml_to_tsv.py
Running command:
-o data/Posts.tsv python code/xml_to_tsv.py
/c: /c: Is a directory
Failed to run command: Stage ‘Dvcfile’ cmd -o data/Posts.tsv python code/xml_to_tsv.py failed

The same command when running via command prompt i am getting this issue
issue :

W:\dvcRepo>dvc run -d data/Posts.xml -d code/xml_to_tsv.py -d code/conf.py \ -o data/Posts.tsv \ python code/xml_to_tsv.py
Initialization error: [Error 3] The system cannot find the path specified: ‘X:\annex\dvc-storage’

Where X is mounted drive.

Ref : https://dvc.org/doc/get-started/example

Thanks in advance


#2

Hi @jagdeesh !

Looks like we had a few typos in our https://dvc.org/doc/get-started/example . Could you please try running it again? Also, just to eliminate a bunch of variables, could you please this time use cmdline to run the commands and also use windows paths if you are running on windows? E.g. data/Posts.xm -> data\Posts.xml.

Thank you,
Ruslan


#3

Ah, I see what happened in your case. In your first command

dvc run -d data/Posts.xml -d code/xml_to_tsv.py -d code/conf.py \ -o data/Posts.tsv \ python code/xml_to_tsv.py
Running command:
-o data/Posts.tsv python code/xml_to_tsv.py
/c: /c: Is a directory
Failed to run command: Stage ‘Dvcfile’ cmd -o data/Posts.tsv python code/xml_to_tsv.py failed

the command itself was wrongly parsed. Looks like gitbash doesn’t have the same logic for arguments as bash on *nix. Could you please try running this command instead:

dvc run -d data\Posts.xml -d code\xml_to_tsv.py -d code\conf.py -o data\Posts.tsv python code\xml_to_tsv.py

and see if it works?

Thank you,
Ruslan