[ckan-dev] extension issues: ckanext-googleanalytics

Mark Gregson mark.gregson at linkdigital.com.au
Mon Oct 31 04:42:15 UTC 2016


In some of our environments (AWS with the amazon distro which is
centos-like) we've found that pip installs packages into dist-packages
instead of site-packages (don't know why yet - possibly because we're doing
it as the root user) and we need to modify bin/activate_this.py to call
site.addsitedir(dist-packages) to make the virtualenv load the packages.
You can check this by looking in
/usr/lib/ckan/default/lib/python2.7/dist-packages - if this folder doesn't
exist or is empty then this isn't your problem.

Cheers
Mark



*MARK GREGSON * |  *TEAM LEAD*
Link Digital

www.linkdigital.com.au
p: *02 6111 2907* | f: 02 6248 5582
e: mark.gregson at linkdigital.com.au
GPO Box 199 Canberra ACT 2601
5/32 Lonsdale Street Braddon ACT 2612

On 29 October 2016 at 23:07, Carl Lange <carl at derilinx.com> wrote:

> Hi Thomas,
>
> Are you sure you were in the CKAN virtualenv before installing the plugin?
> You get into the virtualenv by doing something like
>
> . /usr/lib/ckan/default/bin/activate
>
> This puts you in the CKAN environment, after which you should install the
> plugin.
>
> The error message you post is the one you get when CKAN can't find the
> plugin, and this is nearly always the case when you forgot to activate the
> virtualenv.
>
> Cheers,
> Carl
>
> On Sat, 29 Oct 2016 at 00:47 Thomas Heetderks - MSU <
> thomas.heetderks at montana.edu> wrote:
>
>> Hi -
>>
>> We have CKAN 2.5.2 up and running on CentOS 6.8
>>
>> I have been trying to install ckanext-googleanalytics
>> The pip install from github went fine.
>>
>> But when I tried to add googleanalytics to the ckan.plugins setting in
>> the production.ini file,
>> and restarted mod_wsgi-- I got this error:
>>
>> PluginNotFoundException: googleanalytics
>>
>> The entire trace-back follows--
>>
>> Thanks in advance for any help!
>>
>> - Thomas
>>
>> -----------
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236] mod_wsgi
>> (pid=12715): Target WSGI script '/etc/ckan/default/apache.wsgi' cannot
>> be loaded as Python module.
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236] mod_wsgi
>> (pid=12715): Exception occurred processing WSGI script
>> '/etc/ckan/default/apache.wsgi'.
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236] Traceback
>> (most recent call last):
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]   File
>> "/etc/ckan/default/apache.wsgi", line 18, in <module>
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]
>> application = loadapp('config:%s' % config_filepath)
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]   File
>> "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line
>> 247, in loadapp
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]     return
>> loadobj(APP, uri, name=name, **kw)
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]   File
>> "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line
>> 272, in loadobj
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]     return
>> context.create()
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]   File
>> "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line
>> 710, in create
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]     return
>> self.object_type.invoke(self)
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]   File
>> "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line
>> 146, in invoke
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]     return
>> fix_call(context.object, context.global_conf, **context.local_conf)
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]   File
>> "/usr/local/lib/python2.7/site-packages/paste/deploy/util.py", line 55,
>> in fix_call
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]     val =
>> callable(*args, **kw)
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]   File
>> "/usr/lib/ckan/default/src/ckan/ckan/config/middleware.py", line 58, in
>> make_app
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]
>> load_environment(conf, app_conf)
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]   File
>> "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 232,
>> in load_environment
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]
>> p.load_all(config)
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]   File
>> "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 134, in
>> load_all
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]
>> load(*plugins)
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]   File
>> "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 148, in load
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]     service =
>> _get_service(plugin)
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]   File
>> "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 255, in
>> _get_service
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]     raise
>> PluginNotFoundException(plugin_name)
>> [Fri Oct 28 13:43:39 2016] [error] [client 153.90.201.236]
>> PluginNotFoundException: googleanalytics
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236] mod_wsgi
>> (pid=12716): Target WSGI script '/etc/ckan/default/apache.wsgi' cannot
>> be loaded as Python module.
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236] mod_wsgi
>> (pid=12716): Exception occurred processing WSGI script
>> '/etc/ckan/default/apache.wsgi'.
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236] Traceback
>> (most recent call last):
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]   File
>> "/etc/ckan/default/apache.wsgi", line 18, in <module>
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]
>> application = loadapp('config:%s' % config_filepath)
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]   File
>> "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line
>> 247, in loadapp
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]     return
>> loadobj(APP, uri, name=name, **kw)
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]   File
>> "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line
>> 272, in loadobj
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]     return
>> context.create()
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]   File
>> "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line
>> 710, in create
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]     return
>> self.object_type.invoke(self)
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]   File
>> "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line
>> 146, in invoke
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]     return
>> fix_call(context.object, context.global_conf, **context.local_conf)
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]   File
>> "/usr/local/lib/python2.7/site-packages/paste/deploy/util.py", line 55,
>> in fix_call
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]     val =
>> callable(*args, **kw)
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]   File
>> "/usr/lib/ckan/default/src/ckan/ckan/config/middleware.py", line 58, in
>> make_app
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]
>> load_environment(conf, app_conf)
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]   File
>> "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 232,
>> in load_environment
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]
>> p.load_all(config)
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]   File
>> "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 134, in
>> load_all
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]
>> load(*plugins)
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]   File
>> "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 148, in load
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]     service =
>> _get_service(plugin)
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]   File
>> "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 255, in
>> _get_service
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]     raise
>> PluginNotFoundException(plugin_name)
>> [Fri Oct 28 13:43:42 2016] [error] [client 153.90.201.236]
>> PluginNotFoundException: googleanalytics
>> _______________________________________________
>> 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
>>
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20161031/1637c1e2/attachment-0003.html>


More information about the ckan-dev mailing list