-
Notifications
You must be signed in to change notification settings - Fork 76
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
DOI downloader doesn't work for figshare "collections" #274
Comments
Thanks for reporting @rabernat! I had no idea collections existed to be honest. It's strange because they don't resolve to a particular dataset but to a collection of other datasets with their own DOIs. I suspect the API end point is different for collections and there may be no way around specifying which dataset you want (not just the file name). Testing this out, I can get a list of the contents of a collection:
The main difficulty is that the I'm not sure there is a good way for us to resolve this. It's not hard to figure out if a DOI is a collection (they seem to always contain Any suggestions from anyone on how to resolve this? We should at least document that it won't work for collection DOIs (PR welcome 🙂). |
I think the only feasible solution is to document what we have learned about the difference between figshare collections and datasets. PR forthcoming. |
Now that I think about it, it would be great if we actually handled that error better. It's coming from the figshare API returning 0 matching datasets for the DOI and then we try to index the resulting empty list. A better implementation would be to check if the list is empty and raise an exception saying that no datasets were found for the DOI and explain that if this is a collection then we don't support it and use the dataset DOI instead. |
Thanks again for this excellent package.
I am documenting this issue I encountered, which may or may not be a bug.
I am trying to use the DOI downloader following these instructions. The example code there works for me. However, it doesn't seem to work on the following repository:
https://figshare.com/collections/xmitgcm_test_data/4362224
for which the figshare DOI is
https://doi.org/10.6084/m9.figshare.c.4362224.v1
Code to reproduce the issue
IndexError
Figshare datasets vs. collections
I think that the core issue is the following:
Example DOI from Pooch docs:
My DOI:
$ curl "https://api.figshare.com/v2/articles?doi=10.6084/m9.figshare.c.4362224.v1" []
I think the core problem is that my DOI points to a figshare collection not a dataset. I didn't even realize this distinction existed until I decided to write up this issue.
The text was updated successfully, but these errors were encountered: