Tuesday, November 25, 2014

Upgrading Pyramid Application

Environment:

  • Python 3.4 (using virtualenv)
  • Pyramid 1.5.2
During an upgrade of a project developed in previous release of Pyramid (and Python 2.x), In encountered error(s) caused by Paste. Luckily, there is another person who encounter the same issue and "document" it very well here. My steps for troubleshoot this issue more or less is the same:

Changes in development.ini

Remove
[pipeline:main]
pipeline =
    egg:WebError#evalerror
    {{myproject}}
Change
[app:{{project}}]
To
[app:main]

Changed server from Paste
[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 6543
 To pyramid
[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
Changes in setup.py changed requires from
requires = [
    'pyramid',
    'pyramid_beaker',
    'SQLAlchemy',
    'transaction',
    'zope.sqlalchemy',
    'WebError',
]
to
requires = [
    'pyramid',
    'pyramid_beaker',
    'SQLAlchemy',
    'transaction',
    'zope.sqlalchemy',
]
It's important to remove WebError

[Update 4/3/2015]
Important:
It's important to remove "paste" from your system, since somehow pyramid will encounter error when this package exists in your system (virtualenv). "pastedeploy" is acceptable

No comments:

Post a Comment