On 11/6/07, Humberto Diógenes <[EMAIL PROTECTED]> wrote:
> I pulled the latest version from the repository but couldn't use it.
>
>
> ### Existing project:
>
> URL: http://localhost:5000/location/index
> File '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> site-packages/Pylons-0.9.7dev_20071106-py2.4.egg/pylons/error.py',
> line 245 in respond
> app_iter = self.application(environ, detect_start_response)
> File '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> site-packages/Pylons-0.9.7dev_20071106-py2.4.egg/pylons/wsgiapp.py',
> line 95 in __call__
> controller = self.resolve(environ, start_response)
> File '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> site-packages/Pylons-0.9.7dev_20071106-py2.4.egg/pylons/wsgiapp.py',
> line 173 in resolve
> match = environ['wsgiorg.routing_args'][1]
> KeyError: 'wsgiorg.routing_args'
This is going to be a recurring problem with Pylons-dev. When
upgrading an app from Pylons 0.9.6 to 0.9.7, you have to add three
lines to middleware.py:
# CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares)
# Routing/Session/Cache Middleware
app = RoutesMiddleware(app, config['routes.map'])
app = SessionMiddleware(app, config)
app = CacheMiddleware(app, config)
Downgrading, you have to remove these lines, because Pylons 0.9.6
activates them implicitly.
> ### New project:
>
> $ paster create -t pylons PylonsTest2
> [...]
> OSError: [Errno 2] No such file or directory: '/Library/Frameworks/
> Python.framework/Versions/2.4/lib/python2.4/site-packages/
> Pylons-0.9.7dev_20071106-py2.4.egg/pylons/templates/default_project'
>
> $ ls -l /Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/Pylons-0.9.7dev_20071106-py2.4.egg/pylons/
> templates/
> -rwxr-xr-x 1 root admin 0 Nov 6 19:02 __init__.py
> -rwxr-xr-x 1 root admin 221 Nov 6 19:02 __init__.pyc
It works for me, both with my existing dev snapshot (d3c5b6893348) and
after "hg pull -u" (a7756badfe81). Maybe you got an incomplete
update?
$ ls -l ~/mercurial/Pylons/pylons/templates
total 20
-rw-r--r-- 1 mso mso 281 2007-10-22 12:36 controller.py_tmpl
drwxr-xr-x 5 mso mso 4096 2007-10-22 12:36 default_project
-rw-r--r-- 1 mso mso 0 2007-10-22 12:36 __init__.py
drwxr-xr-x 4 mso mso 4096 2007-10-22 12:36 minimal_project
-rw-r--r-- 1 mso mso 2085 2007-10-22 12:36 restcontroller.py_tmpl
-rw-r--r-- 1 mso mso 200 2007-10-22 12:36 test_controller.py_tmpl
--
Mike Orr <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---