citation-file-format / doi2cff

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

KeyError: 'Zenodo record does not contain a related identifier with isSupplementTo relation' #2

Closed egpbos closed 6 years ago

egpbos commented 6 years ago

Description

I just created a new entry on Zenodo, but it doesn't work with release2cff.

What I Did

$ release2cff init https://doi.org/10.5281/zenodo.1189196
Traceback (most recent call last):
  File "/Users/pbos/sw/miniconda3/bin/release2cff", line 11, in <module>
    load_entry_point('release2cff==1.0.0', 'console_scripts', 'release2cff')()
  File "/Users/pbos/sw/miniconda3/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/pbos/sw/miniconda3/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/pbos/sw/miniconda3/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/pbos/sw/miniconda3/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/pbos/sw/miniconda3/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/pbos/sw/miniconda3/lib/python3.6/site-packages/release2cff/cli.py", line 54, in init
    tagurl = tagurl_of_zenodo(zenodo_record)
  File "/Users/pbos/sw/miniconda3/lib/python3.6/site-packages/release2cff/cli.py", line 110, 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

The command works for GitHub releases which generate a Zenodo DOI entry. The DOI you supplied is a Zenodo conference paper entry and not a entry based on a GitHub release.

So it is outside the scope of the current implementation, but I will accept a Pull Request which implements it.

egpbos commented 6 years ago

Ok, thanks for the clarification.