Replies: 1 comment 2 replies
-
Last commit to the extension was done 3 years ago and the readme says that it was developed and tested on ckan 2.7.3. It most likely won't work with CKAN 2.9. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I’ve been working on installing the CKAN Resource Authorizer extension (https://extensions.ckan.org/extension/resourceauthorizer/). I’m in the final stages of installation, all I need is to create the necessary tables in the database using and to reindex the CKAN metadata in SOLR using the following commands, as per the installation instructions, in the python environment:
There are no issues when I run (see below output): paster --plugin=ckanext-resourceauthorizer resourceauthorizer initdb --config=/etc/ckan/default/ckan.ini
2021-07-29 10:50:09,931 INFO [ckan.cli] Using configuration file /etc/ckan/default/ckan.ini
2021-07-29 10:50:09,931 INFO [ckan.config.environment] Loading static files from public
2021-07-29 10:50:10,023 INFO [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
2021-07-29 10:50:10,601 INFO [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
2021-07-29 10:50:10,895 DEBUG [ckanext.harvest.model] Harvest tables defined in memory
2021-07-29 10:50:10,914 DEBUG [ckanext.harvest.model] Harvest tables already exist
2021-07-29 10:50:11,070 INFO [ckan.config.environment] Loading static files from public
2021-07-29 10:50:11,179 INFO [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
2021-07-29 10:50:11,372 INFO [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
2021-07-29 10:50:11,403 DEBUG [ckanext.harvest.model] Harvest tables already exist
resource_acl table created
However, I get the below error when I run: paster --plugin=ckan search-index rebuild --config=/etc/ckan/default/ckan.ini
Command 'search-index' not known (you may need to run setup.py egg_info)
Known commands:
create Create the file layout for a Python distribution
exe Run #! executable files
help Display help
make-config Install a package and create a fresh config file/directory
points Show information about entry points
post Run a request for the described application
request Run a request for the described application
serve Serve the described application
setup-app Setup an application, given a config file
As such, as per CKAN 2.9, I ran this command instead with no issues (see below output): ckan --config=/etc/ckan/default/ckan.ini search-index rebuild
2021-07-29 10:51:28,143 INFO [ckan.cli] Using configuration file /etc/ckan/default/ckan.ini
2021-07-29 10:51:28,144 INFO [ckan.config.environment] Loading static files from public
2021-07-29 10:51:28,254 INFO [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
2021-07-29 10:51:28,816 INFO [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
2021-07-29 10:51:28,888 DEBUG [ckanext.harvest.model] Harvest tables defined in memory
2021-07-29 10:51:28,904 DEBUG [ckanext.harvest.model] Harvest tables already exist
2021-07-29 10:51:29,318 INFO [ckan.lib.search] Rebuilding search index...
2021-07-29 10:51:29,322 INFO [ckan.lib.search] Rebuilding the whole index...
Indexing dataset 6/62021-07-29 10:51:31,074 INFO [ckan.lib.search] Finished rebuilding search index.
2021-07-29 10:51:31,626 INFO [ckan.lib.search] Commited pending changes on the search index
At this point, everything seems to be set up but unfortunately when I run CKAN and click on the "manage" button of a resource in a dataset I get the following error (prompted in the ckan console)
File "/usr/lib/ckan/default/src/ckan/ckan/templates/page.html", line 89, in block 'primary_content'
{% block page_header %}
File "/usr/lib/ckan/default/src/ckan/ckan/templates/page.html", line 97, in block 'page_header'
{% block content_primary_nav %}{% endblock %}
File "/usr/lib/ckan/default/src/ckan/ckan/templates/package/resource_edit_base.html", line 25, in block 'content_primary_nav'
{% block inner_primary_nav %}{% endblock %}
File "/usr/lib/ckan/default/src/ckanext-resourceauthorizer/ckanext/resourceauthorizer/templates/package/resource_edit_base.html", line 5, in block 'inner_primary_nav'
{{ h.build_nav_icon('resource_acl', _('Resource ACL'), dataset_id=pkg.name, resource_id=res.id) }}
File "/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py", line 1052, in build_nav_icon
return _make_menu_item(menu_item, title, **kw)
File "/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py", line 1130, in _make_menu_item
raise Exception('menu item
%s
cannot be found' % menu_item)Exception: menu item
resource_acl
cannot be foundI am not sure why this error occurs since the first paster command appeared to create the resource_acl ("resource_acl table created"). As per CKAN 2.9, I tried running the following command instead: ckan --config=/etc/ckan/default/ckan.ini resourceauthorizer
But I got the following error:
2021-07-29 10:56:21,448 INFO [ckan.cli] Using configuration file /etc/ckan/default/ckan.ini
2021-07-29 10:56:21,448 INFO [ckan.config.environment] Loading static files from public
2021-07-29 10:56:21,536 INFO [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
2021-07-29 10:56:22,071 INFO [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
2021-07-29 10:56:22,499 DEBUG [ckanext.harvest.model] Harvest tables defined in memory
2021-07-29 10:56:22,515 DEBUG [ckanext.harvest.model] Harvest tables already exist
Usage: ckan [OPTIONS] COMMAND [ARGS]...
Error: No such command 'resourceauthorizer'.
It appears that CKAN does not recognise resourceauthorizer as a command (but paster did recognise it). Any help or advice on how to resolve this issue would be greatly appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions