ckanext-dcat
ckanext-dcat copied to clipboard
Command line interface not working with ckan 2.9 and python 2.8
The CLI commands do not work with ckan >= 2.9 and python >= 2.8.
The problem is related to ckan.plugins.toolkit.CkanCommand
that is deprecated
On CKAN>=2.9 you need to use the ckan
command instead of the paster
one:
ckan -c ../ckan/ckan.ini generate-static json out.json
The command runs but I see that it is currently broken:
File "/home/adria/dev/pyenvs/ckan-py3/src/ckanext-dcat/ckanext/dcat/cli.py", line 21, in json
utils.generate_static_json(output)
File "/home/adria/dev/pyenvs/ckan-py3/src/ckanext-dcat/ckanext/dcat/utils.py", line 370, in generate_static_json
toolkit.get_action('dcat_datasets_list')({},
File "/home/adria/dev/pyenvs/ckan-py3/src/ckan/ckan/logic/__init__.py", line 445, in get_action
raise KeyError("Action '%s' not found" % action)
KeyError: "Action 'dcat_datasets_list' not found"
I'm not familiar with this command's expected behaviour and its implementation but if you need it perhaps you can have a go at fixing it?
Thanks for the answer @amercader I will try to fix it.