fair-research / bdbag

Big Data Bag Utilities
https://fair-research.org
Apache License 2.0
49 stars 23 forks source link

Creating a bag from a remote file manifest raises an exception #15

Closed NickolausDS closed 6 years ago

NickolausDS commented 6 years ago

When creating a bag with the following command:

$ bdbag bag/ --remote-file-manifest manifest.json

An error is raised:

RuntimeError: Expected the same number of files for each checksum

Details about the above command:

This didn't seem to happen on previous versions. Before, it allowed me to create an 'empty' bdbag with a fetch file that could be used to pull down the remote files and validate them.

mikedarcy commented 6 years ago

Unfortunately, this is an issue with bagit-1.6.x and some new error checking logic which basically is prohibiting the bagging of an empty directory. I can reproduce this with just bagit ./bag/ on an empty directory. This worked in bagit-1.5.4 and I think needs to continue to work. There is a pretty easy one line fix for this in bagit.py so I will file a PR with bagit and see what they have to say.

mikedarcy commented 6 years ago

Filed a PR for bagit: https://github.com/LibraryOfCongress/bagit-python/pull/100