I am running my CKAN instance with docker-compose. I installed ckanext-pages with pip inside of the Python venv running in the CKAN docker container. Then I added pages to my ckan.plugins section of my configuration. This part of my configuration is below:
Traceback (most recent call last):
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/lib/ckan/venv/src/ckan/ckan/views/home.py", line 64, in index
return base.render(u'home/index.html', extra_vars={})
File "/usr/lib/ckan/venv/src/ckan/ckan/lib/base.py", line 127, in render
return flask_render_template(template_name, **extra_vars)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/templating.py", line 134, in render_template
context, ctx.app)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/templating.py", line 116, in _render
rv = template.render(context)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/jinja2/environment.py", line 989, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/jinja2/environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/ckan/venv/src/ckan/ckan/templates/home/index.html", line 2, in top-level template code
{% set homepage_style = ( g.homepage_style or '1' ) %}
File "/usr/lib/ckan/venv/src/ckan/ckan/templates/page.html", line 1, in top-level template code
{% extends "base.html" %}
File "/usr/lib/ckan/venv/src/ckanext-pages/ckanext/pages/theme/templates_main/base.html", line 1, in top-level template code
{% ckan_extends %}
File "/usr/lib/ckan/venv/src/ckan/ckan/templates/base.html", line 101, in top-level template code
{%- block page %}{% endblock -%}
File "/usr/lib/ckan/venv/src/ckan/ckan/templates/page.html", line 14, in block "page"
{%- block header %}
File "/usr/lib/ckan/venv/src/ckan/ckan/templates/page.html", line 15, in block "header"
{% include "header.html" %}
File "/usr/lib/ckan/venv/src/ckanext-pages/ckanext/pages/theme/templates_main/header.html", line 1, in top-level template code
{% ckan_extends %}
File "/usr/lib/ckan/venv/src/ckan/ckan/templates/header.html", line 1, in top-level template code
{% block header_wrapper %} {% block header_account %}
File "/usr/lib/ckan/venv/src/ckan/ckan/templates/header.html", line 84, in block "header_wrapper"
{% block header_site_navigation %}
File "/usr/lib/ckan/venv/src/ckan/ckan/templates/header.html", line 87, in block "header_site_navigation"
{% block header_site_navigation_tabs %} {{ h.build_nav_main( ('search', _('Datasets')), ('organizations_index', _('Organizations')),
File "/usr/lib/ckan/venv/src/ckan/ckan/templates/header.html", line 87, in block "header_site_navigation_tabs"
{% block header_site_navigation_tabs %} {{ h.build_nav_main( ('search', _('Datasets')), ('organizations_index', _('Organizations')),
File "/usr/lib/ckan/venv/src/ckanext-pages/ckanext/pages/plugin.py", line 47, in build_pages_nav_main
if (toolkit.c.action in ('pages_show', 'blog_show')
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/werkzeug/local.py", line 347, in __getattr__
return getattr(self._get_current_object(), name)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/werkzeug/local.py", line 347, in __getattr__
return getattr(self._get_current_object(), name)
File "/usr/lib/ckan/venv/src/ckan/ckan/config/middleware/flask_app.py", line 334, in __getattr__
return getattr(app_globals.app_globals, name)
AttributeError: '_Globals' object has no attribute 'action'
Traceback (most recent call last):
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/httpserver.py", line 1068, in process_request_in_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
self.handle()
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/httpserver.py", line 442, in handle
BaseHTTPRequestHandler.handle(self)
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/httpserver.py", line 437, in handle_one_request
self.wsgi_execute()
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/httpserver.py", line 287, in wsgi_execute
self.wsgi_start_response)
File "/usr/lib/ckan/venv/src/ckan/ckan/config/middleware/__init__.py", line 202, in __call__
return self.apps[app_name](environ, start_response)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/repoze/who/middleware.py", line 86, in __call__
app_iter = app(environ, wrapper.wrap_start_response)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/dec.py", line 147, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/dec.py", line 208, in call_func
return self.func(req, *args, **kwargs)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/fanstatic/publisher.py", line 234, in __call__
return request.get_response(self.app)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/request.py", line 1053, in get_response
application, catch_exc_info=False)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/request.py", line 1022, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/dec.py", line 147, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/dec.py", line 208, in call_func
return self.func(req, *args, **kwargs)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/fanstatic/injector.py", line 54, in __call__
response = request.get_response(self.app)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/request.py", line 1053, in get_response
application, catch_exc_info=False)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/request.py", line 1022, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/app.py", line 1997, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/beaker/middleware.py", line 156, in __call__
return self.wrap_app(environ, session_start_response)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/app.py", line 1547, in handle_exception
return self.finalize_request(handler(e), from_error_handler=True)
File "/usr/lib/ckan/venv/src/ckan/ckan/config/middleware/flask_app.py", line 411, in error_handler
extra_vars = {u'code': e.code, u'content': e.description}
AttributeError: 'exceptions.AttributeError' object has no attribute 'code'
Does anyone know what could be going wrong here? I am running the latest version of CKAN (as of the date of this post). Any help would be appreciated.
Whenever I add the
pagesplugin to my CKAN configuration file after following the install instructions in the Readme for this repository, I can't load my home page anymore. I get an internal server error.I am running my CKAN instance with docker-compose. I installed ckanext-pages with pip inside of the Python venv running in the CKAN docker container. Then I added
pagesto myckan.pluginssection of my configuration. This part of my configuration is below:CKAN runs fine if I remove the
pagesplugin from my configuration, but as soon as I add it back in, I can't load my home page anymore.These are the logs in my CKAN container when I access my home page:
Does anyone know what could be going wrong here? I am running the latest version of CKAN (as of the date of this post). Any help would be appreciated.