Pylons 0.9.7

5 views
Skip to first unread message

Krishgy

unread,
Jul 20, 2008, 12:27:29 AM7/20/08
to pylons-discuss
Hi All,

I trying to work with Pylons 0.9.7. I downloaded 0.9.7 with
easy_install pylons==dev mode.

I also installed tw.forms.

I had the following issues

1. When I try to run my existing application, it gave me error in
python-openid which is expecting greater than 2.0.1. But when I
installed pylons 0.9.7, python-openid < 2.0.0 was installed.

Then I downloaded python-openid > 2.0.0 which solved the problem (for
at least my knowledge).

Then I try to run my application. Paster started successfully with
ErrorDocument depreciated warning.

Then I got this error while I am trying to access home page

Error Traceback:
View as: Interactive (full) | Text (full) | XML (full)
⇝ KeyError: 'wsgiorg.routing_args'
clear this
clear this
URL: http://localhost:5000/
Module weberror.evalexception:428 in respond view
<< try:
__traceback_supplement__ = errormiddleware.Supplement,
self, environ
app_iter = self.application(environ,
detect_start_response)

# Don't create a list from a paste.fileapp object
>> app_iter = self.application(environ, detect_start_response)
Module tw.core.middleware:30 in __call__ view
<< def __call__(self, environ, start_response):
return self.wsgi_app(environ, start_response)

def wsgi_app(self, environ, start_response):
>> return self.wsgi_app(environ, start_response)
Module paste.registry:350 in __call__ view
<<
try:
app_iter = self.application(environ, start_response)
except Exception, e:
# Regardless of if the content is an iterable,
generator, list
>> app_iter = self.application(environ, start_response)
Module tw.core.middleware:48 in wsgi_app view
<< req.script_name += reg.prefix
return req.get_response(reg)(environ,
start_response)
return req.get_response(self.application)(environ,
start_response)
finally:
self.host_framework.end_request(environ)
>> return req.get_response(self.application)(environ, start_response)
Module webob:1304 in get_response view
Module webob:1272 in call_application view
Module tw.core.resource_injector:56 in _injector view
<< return writer

app_iter = app(environ, determine_response_type)
if context['inject']:
#XXX check PEP 333 to see if this is correct behaviour
>> app_iter = app(environ, determine_response_type)
Module sqlalchemymanager:84 in __call__ view
<< environ['sqlalchemy.session'] = session
try:
return self.app(environ, start_response)
finally:
session.close()
>> return self.app(environ, start_response)
Module authkit.authenticate:324 in __call__ view
<< def __call__(self, environ, start_response):
environ.update(self.dct)
return self.app(environ, start_response)

class RequireEnvironKey(object):
>> return self.app(environ, start_response)
Module authkit.authenticate.cookie:396 in __call__ view
<< headers.extend(set_cookies)
return start_response(status, headers, exc_info)
return self.app(environ, cookie_setting_start_response)

#
>> return self.app(environ, cookie_setting_start_response)
Module authkit.authenticate.multi:62 in __call__ view
<< return None

app_iter = app(environ, start_response)
if not status_:
raise Exception('WSGI start_response was not called
before a result'
>> app_iter = app(environ, start_response)
Module authkit.authenticate.multi:32 in app view
<< exc_info_.append(exc_info)
log.debug("Status: %r, Headers: %r", status,
headers)
return self.default(environ, find)

def logging_start_response(status, headers,
exc_info=None):
>> return self.default(environ, find)
Module authkit.authenticate:174 in __call__ view
<< p['environ'] = environ
environ[self.key] = self.value(*self.k, **p)
return self.app(environ, start_response)

def get_authenticate_function(app, authenticate_conf, format,
prefix):
>> return self.app(environ, start_response)
Module authkit.authenticate:337 in __call__ view
<< if not environ.has_key(self.key):
raise Exception(self.missing_error%{'key':self.key})
return self.app(environ, start_response)

def get_methods():
>> return self.app(environ, start_response)
Module paste.httpexceptions:636 in __call__ view
<< []).append(HTTPException)
try:
return self.application(environ, start_response)
except HTTPException, exc:
return exc(environ, start_response)
>> return self.application(environ, start_response)
Module pylons.wsgiapp:116 in __call__ view
<< return ['%s' %
paste.registry.restorer.get_request_id(environ)]

controller = self.resolve(environ, start_response)
response = self.dispatch(controller, environ,
start_response)

>> controller = self.resolve(environ, start_response)
Module pylons.wsgiapp:240 in resolve view
<< config = request_config()
config.redirect = self.redirect_to
match = environ['wsgiorg.routing_args'][1]

environ['pylons.routes_dict'] = match
>> match = environ['wsgiorg.routing_args'][1]
KeyError: 'wsgiorg.routing_args'


Any Idea?

Mike Orr

unread,
Jul 20, 2008, 12:39:53 AM7/20/08
to pylons-...@googlegroups.com

wsgiorg.routing_args is set by the Routes middleware. Is that present
in middleware.py? The only nonstandard thing I see is AuthKit. Does
the error go away if you comment out the AuthKit middleware? What if
you move it above the Routes middleware? If none of those work, we
may need to see your middleware.py.

I haven't used python-openid so I don't know how it might figure in.

--
Mike Orr <slugg...@gmail.com>

Krishgy

unread,
Jul 20, 2008, 9:42:00 AM7/20/08
to pylons-discuss
I try to create a new project which works for me. So I might need to
add few things to make my existing application to work with pylons
0.9.7. I will not do that. Instead I will go with the new project and
port my project files to new project.


Is it advisable to go with Pylons 0.9.7 at this stage? I observed the
discussion comments and found that there are more documentation work
in progress for Pylons 0.9.7, so I believe that there won't be much
changes in the technologies and API.


On Jul 20, 9:39 am, "Mike Orr" <sluggos...@gmail.com> wrote:
> Mike Orr <sluggos...@gmail.com>
Reply all
Reply to author
Forward
0 new messages