Hi folks

I'm trying to upgrade an application from 0.9.6 to 0.9.7, and I'm
stuck on the last bug.

Whenever any of my formencode schemas cause validation to fail (via
the @validate decorator on form POST), I lose all the request params
when the request is redirected to my form display method.  This then
causes KeyErrors when I go to display the form with the errors.  I
can't work out what's causing the problem.

Although request.params (and request.GET and .POST) are empty
MultiDicts, from the wsgi variables I can see that all my submitted
parameters are present in 'webob._parsed_post_vars'.

Here's a stack trace:

Traceback (most recent call last):
  File "/home/johnd/python/jcr-0.6.7/jcr/lib/base.py", line 98, in
__call__
    return WSGIController.__call__(self, environ, start_response)
  File "/usr/lib/python2.5/site-packages/Pylons-0.9.7-py2.5.egg/pylons/
controllers/core.py", line 221, in __call__
    response = self._dispatch_call()
  File "/usr/lib/python2.5/site-packages/Pylons-0.9.7-py2.5.egg/pylons/
controllers/core.py", line 172, in _dispatch_call
    response = self._inspect_call(func)
  File "/usr/lib/python2.5/site-packages/Pylons-0.9.7-py2.5.egg/pylons/
controllers/core.py", line 107, in _inspect_call
    result = self._perform_call(func, args)
  File "/usr/lib/python2.5/site-packages/Pylons-0.9.7-py2.5.egg/pylons/
controllers/core.py", line 60, in _perform_call
    return func(**args)
  File "<string>", line 2, in upload
  File "/usr/lib/python2.5/site-packages/AuthKit-0.4.3-py2.5.egg/
authkit/authorize/pylons_adaptors.py", line 36, in validate
    return permission.check(app, request.environ, self.start_response)
  File "/usr/lib/python2.5/site-packages/AuthKit-0.4.3-py2.5.egg/
authkit/permissions.py", line 177, in check
    return app(environ, start_response)
  File "/usr/lib/python2.5/site-packages/AuthKit-0.4.3-py2.5.egg/
authkit/authorize/pylons_adaptors.py", line 35, in app
    return func(self, *args, **kwargs)
  File "<string>", line 2, in upload
  File "/usr/lib/python2.5/site-packages/Pylons-0.9.7-py2.5.egg/pylons/
decorators/__init__.py", line 161, in wrapper
    response = self._dispatch_call()
  File "/usr/lib/python2.5/site-packages/Pylons-0.9.7-py2.5.egg/pylons/
controllers/core.py", line 172, in _dispatch_call
    response = self._inspect_call(func)
  File "/usr/lib/python2.5/site-packages/Pylons-0.9.7-py2.5.egg/pylons/
controllers/core.py", line 107, in _inspect_call
    result = self._perform_call(func, args)
  File "/usr/lib/python2.5/site-packages/Pylons-0.9.7-py2.5.egg/pylons/
controllers/core.py", line 60, in _perform_call
    return func(**args)
  File "<string>", line 2, in index
  File "/usr/lib/python2.5/site-packages/AuthKit-0.4.3-py2.5.egg/
authkit/authorize/pylons_adaptors.py", line 36, in validate
    return permission.check(app, request.environ, self.start_response)
  File "/usr/lib/python2.5/site-packages/AuthKit-0.4.3-py2.5.egg/
authkit/permissions.py", line 177, in check
    return app(environ, start_response)
  File "/usr/lib/python2.5/site-packages/AuthKit-0.4.3-py2.5.egg/
authkit/authorize/pylons_adaptors.py", line 35, in app
    return func(self, *args, **kwargs)
  File "/home/johnd/python/jcr-0.6.7/jcr/controllers/projectadmin/
selectfileset.py", line 36, in index
    c.projectId = int(request.params['projectId'])
  File "build/bdist.linux-i686/egg/webob/multidict.py", line 314, in
__getitem__
    return self._decode_value(self.multi.__getitem__(self._encode_key
(key)))
  File "build/bdist.linux-i686/egg/webob/multidict.py", line 440, in
__getitem__
    raise KeyError(key)
KeyError: 'projectId'

I'd really appreciate any suggestions on this - I'm stumped :(

Thanks in advance ........................ John Dickson

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to