0

I'm trying to install the CKAN ckanext-spatial plugin by following the step-by-step instructions listed below.

http://docs.ckan.org/projects/ckanext-spatial/en/latest/install.html#ubuntu-12-04-postgresql-9-1-and-postgis-1-5

After installation and configuration, I get the following apache server error when trying to access the site homepage. CKAN is currently unusable. Do I need to upgrade the version of GeoAlchemy or is this an issue with the extension?

mod_wsgi (pid=29881): Target WSGI script '/etc/ckan/default/apache.wsgi' cannot be loaded as Python module. mod_wsgi (pid=29881): Exception occurred processing WSGI script '/etc/ckan/default/apache.wsgi'. Traceback (most recent call last): File "/etc/ckan/default/apache.wsgi", line 10, in application = loadapp('config:%s' % config_filepath) File "/usr/lib/ckan/default/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/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 271, in loadobj global_conf=global_conf) File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext global_conf=global_conf) File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig return loader.get_context(object_type, name, global_conf) File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 454, in get_context section) File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 476, in _context_from_use object_type, name=use, global_conf=global_conf) File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 406, in get_context global_conf=global_conf) File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext global_conf=global_conf) File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 328, in _loadegg return loader.get_context(object_type, name, global_conf) File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 620, in get_context object_type, name=name) File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 646, in find_egg_entry_point possible.append((entry.load(), protocol, entry.name)) File "/usr/lib/ckan/default/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 1989, in load entry = import(self.module_name, globals(),globals(), ['name']) File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware.py", line 26, in from ckan.config.environment import load_environment File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 17, in import ckan.model as model File "/usr/lib/ckan/default/src/ckan/ckan/model/init.py", line 7, in import vdm.sqlalchemy File "/usr/lib/ckan/default/lib/python2.7/site-packages/vdm/sqlalchemy/init.py", line 32, in from tools import Repository File "/usr/lib/ckan/default/lib/python2.7/site-packages/vdm/sqlalchemy/tools.py", line 33, in raise ValueError("VDM only works with SQLAlchemy versions 0.4 through 0.7, not: %s" % sqav) ValueError: VDM only works with SQLAlchemy versions 0.4 through 0.7, not: 1.0.12

AtomEye
  • 81
  • 7

2 Answers2

1

To reiterate the important bit, the error message says:

VDM only works with SQLAlchemy versions 0.4 through 0.7, not: 1.0.12

So it looks like you upgraded SQLAlchemy to the latest version somehow. This happens if you use the --upgrade flag when pip installing something, although the instructions you mention don't say to do that, so I'm not quite sure how you ended up with this version of SQLAlchemy.

I suggest you install the vdm and SQLAlchemy combination that is in the current ckan requirements which is currently:

pip install SQLAlchemy==0.9.6 vdm==0.13

and I believe this is backwards compatible with all ckan versions. (Remember to run pip with your virtualenv activated)

D Read
  • 3,175
  • 1
  • 15
  • 25
0

Fixed it using the following command to correct my version of sqlalchemy. pip install -r /usr/lib/ckan/default/src/ckan/pip-requirements.txt.

This seemed to fix the error.

AtomEye
  • 81
  • 7