You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The use case we have is to update the list of funders.
Current behaviour
In an instance e.g cds-rdm we hold a funder.yaml file with the following syntax:
- id: 00k4n6c32country: BEidentifiers:
- identifier: 00k4n6c32scheme: rorname: European Commissiontitle:
en: European Commission
If we add a new funder in the list and then we run the command invenio vocabularies update -v funders -f app_data/vocabularies.yaml then we get an error:
Traceback (most recent call last):
File "/usr/local/bin/invenio", line 8, in<module>sys.exit(cli())
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
returnf(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 357, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/invenio_vocabularies/cli.py", line 103, in update
forw_confin config["writers"]:
KeyError: 'writers'
The update works if you update the app_data/vocabularies.yaml as below:
We should either fix the cli command to incorporate a more user friendly way of updating a vocabulary entry e.g identify if the data-file is a yaml and use the correct reader or indicate another way of updating or inserting entries in a vocabulary
The text was updated successfully, but these errors were encountered:
Use case
The use case we have is to update the list of funders.
Current behaviour
In an instance e.g cds-rdm we hold a
funder.yaml
file with the following syntax:If we add a new funder in the list and then we run the command
invenio vocabularies update -v funders -f app_data/vocabularies.yaml
then we get an error:The update works if you update the
app_data/vocabularies.yaml
as below:Expected solution
We should either fix the cli command to incorporate a more user friendly way of updating a vocabulary entry e.g identify if the
data-file
is ayaml
and use the correct reader or indicate another way of updating or inserting entries in a vocabularyThe text was updated successfully, but these errors were encountered: