Message5306

Author tercero12
Recipients tercero12
Date 2009-11-11.17:31:59
SpamBayes Score 4.9960036e-15
Marked as misclassified No
Message-id <1257960720.83.0.5503478447.issue1501@psf.upfronthosting.co.za>
In-reply-to
Content
I'm working on getting the web2py framework to work on Jython.  I found
this interesting bug:

Traceback (most recent call last):
  File "C:\web2py2\gluon\main.py", line 442, in wsgibase
    session.connect(request, response)
  File "C:\web2py2\gluon\main.py", line 442, in wsgibase
    session.connect(request, response)
  File "C:\web2py2\gluon\globals.py", line 323, in connect
    response.cookies[response.session_id_name] = response.session_id
  File "C:\jython2.5.1\Lib\Cookie.py", line 579, in __setitem__
    self.__set(key, rval, cval)
  File "C:\jython2.5.1\Lib\Cookie.py", line 572, in _BaseCookie__set
    M.set(key, real_value, coded_value)
  File "C:\jython2.5.1\Lib\Cookie.py", line 450, in set
    if "" != translate(key, idmap, LegalChars):
  File "C:\jython2.5.1\Lib\string.py", line 491, in translate
    return s.translate(table, deletions)
TypeError: translate() takes 2 arguments (2 given)

I've looked at a Cookie.py and string.py and they both seem on track. 
Maybe I'm missing something but it seems they're tripping something up
in the interpreter.

I can use the SimpleCookie class just fine in an interpreter and the key
value in question is "session_id_init" so it's not like we're doing
anything wierd.
History
Date User Action Args
2009-11-11 17:32:01tercero12setrecipients: + tercero12
2009-11-11 17:32:00tercero12setmessageid: <1257960720.83.0.5503478447.issue1501@psf.upfronthosting.co.za>
2009-11-11 17:32:00tercero12linkissue1501 messages
2009-11-11 17:31:59tercero12create