citation-file-format / doi2cff

Generate a CFF file using the metadata from a software release on Zenodo.
Apache License 2.0
21 stars 4 forks source link

No isSupplementTo relation #8

Open hepcat72 opened 6 years ago

hepcat72 commented 6 years ago

Description

Tried creating a .cff file using a DOI. I couldn't get doi2cff to install on my mac, so I was trying on an ubuntu virtualbox.

What I Did

>doi2cff init https://doi.org/10.5281/zenodo.1303402
Traceback (most recent call last):
  File "/home/robleach/.local/bin/doi2cff", line 9, in <module>
    load_entry_point('doi2cff==1.0.0', 'console_scripts', 'doi2cff')()
  File "/home/robleach/.local/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/robleach/.local/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/robleach/.local/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/robleach/.local/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/robleach/.local/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/robleach/.local/lib/python3.5/site-packages/doi2cff/cli.py", line 65, in init
    tagurl = tagurl_of_zenodo(zenodo_record)
  File "/home/robleach/.local/lib/python3.5/site-packages/doi2cff/cli.py", line 124, in tagurl_of_zenodo
    raise KeyError('Zenodo record does not contain a related identifier with isSupplementTo relation ')
KeyError: 'Zenodo record does not contain a related identifier with isSupplementTo relation '
sverhoeven commented 6 years ago

Sorry, to hear that you could not get it working on OSX. On Travis-CI a build on OSX was included. It uses miniconda, maybe this allows helps you install it aswell.

The error you get is because the Zenodo DOI you supplied is not generated by a GitHub release. At the moment doi2cff can only generated cff files from Zenodo entries which where generated by a GitHub release.

The error should be improved so it is clear the doi does not contain GitHub meta data.

jspaaks commented 6 years ago

Just to clarify: Stefan is referring to the fact that at the moment doi2cff can generate CITATION.cff files for DOIs that result from the GitHub-Zenodo integration (https://guides.github.com/activities/citable-code/).