#22 _postL doesn't exist in request object on Mac OS X

open
nobody
None
5
2009-08-06
2009-08-06
Anonymous
No

While running Spyce on Mac OS X, with the system default python (2.5.1), I get an error in request.py after submitting a form. The error is in request.post(), and says that _postL is not a member of self.

After adding some print statements to see what did exist, the following results in correct behavior (note that this may only address the symptom):

def post(self, name=None, default=[], ignoreCase=False, single=False):
"Return POST parameter(s) list(s)"
self._postInit()
if ignoreCase:
if name: name = string.lower(name)
_postL = getattr(self, '_postL', '')
if not _postL:
_post = getattr(self, '_post', '')
if _post:
_postL = lowerize(_post)
return extractValue(_postL, name, default, single)
return extractValue(self._post, name, default, single)

Discussion

  • Some spaces in my post were killed. The funeral for the dead spaces is at 9. Meanwhile, the indentation should be, taking 'def post...' as line 1:
    lines 2-12: indent one level
    lines 5-11: indent one additional level
    lines 8-10: indent one additional level
    line 10: indent one additional level