Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Stage file '<path-to-dvc>.dvc' cannot be an output. #3402

Closed
i-Hun opened this issue Feb 25, 2020 · 5 comments
Closed

ERROR: Stage file '<path-to-dvc>.dvc' cannot be an output. #3402

i-Hun opened this issue Feb 25, 2020 · 5 comments
Labels
awaiting response we are waiting for your reply, please respond! :)

Comments

@i-Hun
Copy link

i-Hun commented Feb 25, 2020

Hi!
I faced a strange and previously unseen issue trying to add some newly created files to DVC with dvc add <path-to-files>.
The full error log is

Stage is cached, skipping.                                                                                  
  0% Add|                                                                   |0.00/1.13k [00:00,     ?file/s]
ERROR: Stage file 'data/xDeepFM-2-1/lbes_cat_101.jbl.dvc' cannot be an output.    

DVC: version 0.82.8.
OS: Ubuntu 18.04.3 LTS

@triage-new-issues triage-new-issues bot added the triage Needs to be triaged label Feb 25, 2020
@efiop
Copy link
Contributor

efiop commented Feb 26, 2020

Hi @i-Hun !

Looks like you are trying to dvc add a .dvc-file, right? If so, it is not allowed.

@efiop efiop added the awaiting response we are waiting for your reply, please respond! :) label Feb 26, 2020
@triage-new-issues triage-new-issues bot removed the triage Needs to be triaged label Feb 26, 2020
@i-Hun
Copy link
Author

i-Hun commented Feb 26, 2020

Oh, you are right. Thanks and sorry for the silly question.

@Roman-
Copy link

Roman- commented Apr 22, 2021

Oh, you are right. Thanks and sorry for the silly question.

This isn't as silly as it might seem, especially when one does dvc add ./dataset1/* which adds all subdirectories (with existing .dvc files!) of the dataset1 directory. I think dvc should not cancel its job in these cases and just ignore adding .dvc files to dvc.

@vargonis
Copy link

@Roman- I'm running exactly into the problem you describe. I tried adding .dvc to .dvcignore, to no avail. Any suggestion to be able to add all the contents of a directory that was previously added, thus creating the corresponding .dvc files inside?

@dberenbaum
Copy link
Collaborator

@vargonis If you have a directory full of .dvc files, you should be able to do something like:

$ dvc remove dir/*.dvc
$ dvc add dir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response we are waiting for your reply, please respond! :)
Projects
None yet
Development

No branches or pull requests

5 participants