I have been on holidays and now only catching up with emails from when I was 
away.

Did you solve this?

To me it looks like you have a module import cycle.

The ckanext-datajson plugin appears to be getting imported automatically as a 
side effect of importing paste.deploy. The problem is that the plugin then 
tries to itself import paste.deploy and use something from it. Because 
paste.deploy hasn't been fully imported at that point, it fails to find what it 
wants.

It seems a bit dodgy to me that the plugin is being automatically imported as a 
side effect of merely importing paste.deploy.

Graham

On 30/09/2014, at 12:57 AM, Renato Guevara <[email protected]> wrote:

> I've been trying to install ckanext-datajson using the the instructions
> located at this site:
> 
> https://github.com/HHS/ckanext-datajson
> 
> There is a section where it says that there may be a dependency bug.  I
> couldn't find a wsgi.py file with the line:
> 
> from paste.deploy import loadapp
> 
> So, I'm not sure if this applied to me or not.  However, when I restart
> apache2, and I try to go to the ckan server, I get a server error.  When I
> look at the logs, I get the following:
> 
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1] mod_wsgi (pid=31295):
> Target WSGI script '/etc/ckan/default/apache.wsgi' cannot be loaded as
> Python module.
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1] mod_wsgi (pid=31295):
> Exception occurred processing WSGI script '/etc/ckan/default/apache.wsgi'.
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1] Traceback (most
> recent call last):
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]   File
> "/etc/ckan/default/apache.wsgi", line 5, in <module>
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]     from paste.deploy
> import loadapp
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]   File
> "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/__init__.py",
> line 3, in <module>
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]     from
> paste.deploy.loadwsgi import *
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]   File
> "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
> line 8, in <module>
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]     import
> pkg_resources
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]   File
> "/usr/lib/ckan/default/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py",
> line 2727, in <module>
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]
> add_activation_listener(lambda dist: dist.activate())
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]   File
> "/usr/lib/ckan/default/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py",
> line 700, in subscribe
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]     callback(dist)
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]   File
> "/usr/lib/ckan/default/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py",
> line 2727, in <lambda>
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]
> add_activation_listener(lambda dist: dist.activate())
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]   File
> "/usr/lib/ckan/default/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py",
> line 2230, in activate
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]
> map(declare_namespace, self._get_metadata('namespace_packages.txt'))
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]   File
> "/usr/lib/ckan/default/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py",
> line 1827, in declare_namespace
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]
> _handle_ns(packageName, path_item)
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]   File
> "/usr/lib/ckan/default/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py",
> line 1797, in _handle_ns
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]
> loader.load_module(packageName); module.__path__ = path
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]   File
> "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]     mod =
> imp.load_module(fullname, self.file, self.filename, self.etc)
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]   File
> "/usr/lib/ckan/default/lib/python2.7/site-packages/ckanext_datajson-0.1-py2.7.egg/ckanext/datajson/__init__.py",
> line 9, in <module>
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]     from plugin
> import DataJsonPlugin
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]   File
> "/usr/lib/ckan/default/lib/python2.7/site-packages/ckanext_datajson-0.1-py2.7.egg/ckanext/datajson/plugin.py",
> line 1, in <module>
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]     import
> ckan.plugins as p
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]   File
> "/usr/lib/ckan/default/src/ckan/ckan/plugins/__init__.py", line 5, in
> <module>
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]     import toolkit as
> _toolkit
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]   File
> "/usr/lib/ckan/default/src/ckan/ckan/plugins/toolkit.py", line 4, in
> <module>
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1]     import
> paste.deploy.converters as converters
> [Mon Sep 29 05:44:03 2014] [error] [client 127.0.0.1] AttributeError:
> 'module' object has no attribute 'deploy'
> 
> What am I doing wrong or what am I forgetting to do?
> 
> Thank you in advance.
> 
> Renato Guevara
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to