ckanext-dcat icon indicating copy to clipboard operation
ckanext-dcat copied to clipboard

Command line interface not working with ckan 2.9 and python 2.8

Open javicond3 opened this issue 2 years ago • 2 comments

The CLI commands do not work with ckan >= 2.9 and python >= 2.8.

The problem is related to ckan.plugins.toolkit.CkanCommandthat is deprecated

javicond3 avatar Jun 09 '22 17:06 javicond3

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?

amercader avatar Jun 10 '22 08:06 amercader

Thanks for the answer @amercader I will try to fix it.

javicond3 avatar Jun 10 '22 14:06 javicond3