[ckan-dev] Upgrade from CKAN 2.5.2 to 2.5.9

Eli Agbayani eagbayani at eol.org
Thu Sep 12 15:33:09 UTC 2019


Dear CKAN team,
I hope you can help me fix my upgrade of CKAN from 2.5.2 to 2.5.9.
We've been using 2.5.2 for a couple of years now. This month we've decided
to upgrade to 2.5.9.
That crashed our system.
Here are the steps I did, and up to the point where I got the error.
I'm not a python developer so please bear with me.


*Upgrading CKAN 2.5.2 to 2.5.9 on Rhel:*python --version
-> Python 2.7.5
pg_config --version
-> PostgreSQL 9.2.24

1. I created a backup of database.
2. Ran these:
. /usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src/ckan

3. Ran these:
git fetch
git checkout ckan-2.5.9

4: Ran this:
pip install --upgrade -r requirements.txt

5. Ran this:
python setup.py develop

6. Restarted by Solr
/solr-4.10.4/bin/solr stop -p 8983
/solr-4.10.4/bin/solr start

Up to this point everything was installed well. No errors.

7*. This is where I get the error when running to upgrade my database:
paster db upgrade -c /etc/ckan/default/development.ini

Error below about: *"ImportError: No module named flask_app"*

Traceback (most recent call last):
  File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
    load_entry_point('PasteScript==2.0.2', 'console_scripts', 'paster')()
  File
"/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py",
line 102, in run
    invoke(command, command_name, options, args[1:])
  File
"/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py",
line 141, in invoke
    exit_code = runner.run(args)
  File
"/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py",
line 236, in run
    result = self.command()
  File "/home/eagbayani/ckan/lib/default/src/ckan/ckan/lib/cli.py", line
205, in command
    self._load_config(cmd!='upgrade')
  File "/home/eagbayani/ckan/lib/default/src/ckan/ckan/lib/cli.py", line
142, in _load_config
    conf = self._get_config()
  File "/home/eagbayani/ckan/lib/default/src/ckan/ckan/lib/cli.py", line
139, in _get_config
    return appconfig('config:' + self.filename)
  File
"/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
line 261, in appconfig
    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/pkg_resources/__init__.py",
line 2258, in load
    return self.resolve()
  File
"/usr/lib/ckan/default/lib/python2.7/site-packages/pkg_resources/__init__.py",
line 2264, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File
"/home/eagbayani/ckan/lib/default/src/ckan/ckan/config/middleware/__init__.py",
line 10, in <module>
    register your own - be that a set of Shakespeare's works, a global
ImportError: No module named flask_app

Any help on how to fix this is very much appreciated.
Thanks,
Eli Agbayani
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20190912/0eae6ec8/attachment.html>


More information about the ckan-dev mailing list