[ckan-dev] ckan-dev Digest, Vol 100, Issue 4

Luke Tully luke at luketully.ca
Tue Feb 12 19:02:48 UTC 2019


Could you post an obfuscated production.ini?

Luke
(204) 981-4494

________________________________
From: ckan-dev <ckan-dev-bounces at lists.okfn.org> on behalf of ckan-dev-request at lists.okfn.org <ckan-dev-request at lists.okfn.org>
Sent: Tuesday, February 12, 2019 6:00:02 AM
To: ckan-dev at lists.okfn.org
Subject: ckan-dev Digest, Vol 100, Issue 4

Send ckan-dev mailing list submissions to
        ckan-dev at lists.okfn.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.okfn.org/mailman/listinfo/ckan-dev
or, via email, send a message with subject or body 'help' to
        ckan-dev-request at lists.okfn.org

You can reach the person managing the list at
        ckan-dev-owner at lists.okfn.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of ckan-dev digest..."


Today's Topics:

   1. Re: mod_wsgi error and mako templates (McDonaldR)


----------------------------------------------------------------------

Message: 1
Date: Mon, 11 Feb 2019 12:34:32 +0000
From: McDonaldR <McDonaldR at angus.gov.uk>
To: CKAN Development Discussions <ckan-dev at lists.okfn.org>
Subject: Re: [ckan-dev] mod_wsgi error and mako templates
Message-ID:
        <7CCEF44D1C42854999B19B1EB27281F6016045B5D8 at SR2ORBHQ2K803.angus.gov.uk>

Content-Type: text/plain; charset="us-ascii"

I've thought a bit more about this and searched the web for CKAN/mako template solutions with limited results.

Is mako a templating engine like Jinja2?  Both Jinja2 and mako are installed in my CKAN.

What plugin should I be installing for mako to use?  If nothing is installed should it not fall back to the default templating engine?

Ross


From: ckan-dev [mailto:ckan-dev-bounces at lists.okfn.org] On Behalf Of McDonaldR
Sent: 11 February 2019 11:35
To: ckan-dev at lists.okfn.org
Subject: [ckan-dev] mod_wsgi error and mako templates

Hi List

I've just upgraded to the latest 2.7.5 patch release (it's never as easy as the docs make out!) and I'm getting a 500 error in the apache2 logs:

mod_wsgi (pid=5269): Target WSGI script '/etc/ckan/default/apache.wsgi' cannot be loaded as Python module.
mod_wsgi (pid=5269): Exception occurred processing WSGI script '/etc/ckan/default/apache.wsgi'.
Traceback (most recent call last):
  File "/etc/ckan/default/apache.wsgi", line 10, in <module>
    application = loadapp('config:%s' % config_filepath)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
    val = callable(*args, **kw)
  File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware/__init__.py", line 49, in make_app
    **app_conf)
  File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware/pylons_app.py", line 55, in make_pylons_stack
    app = pylons_app = CKANPylonsApp()
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/wsgiapp.py", line 80, in __init__
    **def_eng['template_options'])
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/templating.py", line 393, in __init__
    self.prepare(default_engine, template_root, **config)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/templating.py", line 409, in prepare
    '"%s" to use its functionality' % engine_name)
TemplateEngineMissing: Please install a plugin for "mako" to use its functionality

I'm running CKAN 2.7.5 on Ubuntu 14.04 with Apache2 and Nginx.

Permissions on apache.wsgi are

-rw-r--r-- 1 www-data root  405 Dec 12 12:25 apache.wsgi

Contents of apache.wsgi are

import os
activate_this = os.path.join('/usr/lib/ckan/default/bin/activate_this.py')
execfile(activate_this, dict(__file__=activate_this))

from paste.deploy import loadapp

config_filepath = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'production.ini')
from paste.script.util.logging_config import fileConfig
fileConfig(config_filepath)
application = loadapp('config:%s' % config_filepath)

Any pointers gratefully received

Ross



Ross McDonald | Geo-evangelist | Angus Council, People, IT | Angus House, Orchardbank Business Park, Sylvie Way, Forfar DD8 1AT | t: 01307 476419


This message is strictly confidential. If you have received this in error, please inform the sender and remove it from your system. If received in error you may not copy, print, forward or use it or any attachment in any way. This message is not capable of creating a legal contract or a binding representation and does not represent the views of Angus Council. Emails may be monitored for security and network management reasons. Messages containing inappropriate content may be intercepted. Angus Council does not accept any liability for any harm that may be caused to the recipient system or data on it by this message or any attachment.

This message is strictly confidential. If you have received this in error, please inform the sender and remove it from your system. If received in error you may not copy, print, forward or use it or any attachment in any way. This message is not capable of creating a legal contract or a binding representation and does not represent the views of Angus Council. Emails may be monitored for security and network management reasons. Messages containing inappropriate content may be intercepted. Angus Council does not accept any liability for any harm that may be caused to the recipient system or data on it by this message or any attachment.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20190211/1b800654/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org
https://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev


------------------------------

End of ckan-dev Digest, Vol 100, Issue 4
****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20190212/c12fd0e9/attachment.html>


More information about the ckan-dev mailing list