Datalad verification of content failed

I have data hosted on the Open Science Framework, and have created a git-annex “mirror” of this dataset on GitHub using datalad:

Today I wanted to update a file in my dataset. Unfortunately I did not think this through, went to OSF, and edited the file there directory (some line in the dataset_description.json). Shortly after I was done I realized that this will probably lead to issues with datalad, and it does:

This works (because I didn’t change README):

datalad clone
cd eeg_matchingpennies
datalad get README

However, for this, I get an error: datalad get dataset_description.json (the file I changed manually on OSF)

[ERROR ] verification of content failed [get(/home/stefanappelhoff/Desktop/bids/eeg_matchingpennies/dataset_description.json)]
get(error): dataset_description.json (file) [verification of content failed]

I have two questions:

  1. What would have been the “correct” way to change my file?
  2. How can I fix this issue?

I am running datalad 0.12.7 on ubuntu 18.04

@yarikoptic do you have an idea about this?


I think I solved my second question “how to fix it”

So in the shell, from the root of my datalad dataset, I did the following:

python -c "fin=open('tmp.csv', 'w'); fin.writelines(['url,fpath', '\n,dataset_description.json']); fin.close()"
datalad addurls tmp.csv "{url}" "{fpath}" -d . --ifexists overwrite
mv tmp.csv ~/Desktop
datalad save
datalad publish

This successfully updated the URL used for downloading dataset_description.json


regarding my first question on “what would have been the correct way” --> probably use this (new) project: to prevent having to make the hacks that I did in the past.

1 Like