Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line interface not working with ckan 2.9 and python 2.8 #219

Open
javicond3 opened this issue Jun 9, 2022 · 2 comments
Open

Command line interface not working with ckan 2.9 and python 2.8 #219

javicond3 opened this issue Jun 9, 2022 · 2 comments

Comments

@javicond3
Copy link

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

@amercader
Copy link
Member

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?

@javicond3
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants