This is a jython bug. Does this error make sense to you?
"translate() takes 2 arguments (2 given)"
On Tuesday, 17 July 2012 07:50:14 UTC-5, Duncan wrote:
>
> I know this thread is a little old, but I really agree getting web2py
> going on a servlet container would be awesome.
>
> I followed Andrew's excellent example from the previous post, BUT i worked
> around the root url redirect issue by simply renaming the web2py folder to
> 'ROOT' (which, by convention, Tomcat will then serve from '/')
>
> Like this:
> <Tomcat_HOME>
> |__webapps
> |__ROOT
> |
> |__WEB-INF
>
> Anyway, I think I got closer than Andrew's attempt because (yay?) I got a
> real web2py ticket error. The contents of the web2pyticket was:
>
> (dp1
> S'code'
> p2
> S''
> p3
> sS'output'
> p4
> S''
> p5
> sS'snapshot'
> p6
> (dp7
> sS'layer'
> p8
> S'Framework'
> p9
> sS'traceback'
> p10
> S'Traceback (most recent call last):\n File
> "C:\\Users\\duncanjm\\Documents\\various\\tomcat\\tomcat7\\webapps\\ROOT\\WEB-INF\\lib-python\\gluon\\main.py",
>
> line 475, in wsgibase\n session.connect(request, response)\n File
> "C:\\Users\\duncanjm\\Documents\\various\\tomcat\\tomcat7\\webapps\\ROOT\\WEB-INF\\lib-python\\gluon\\main.py",
>
> line 475, in wsgibase\n session.connect(request, response)\n File
> "C:\\Users\\duncanjm\\Documents\\various\\tomcat\\tomcat7\\webapps\\ROOT\\WEB-INF\\lib-python\\gluon\\globals.py",
>
> line 507, in connect\n response.cookies[response.session_id_name] =
> response.session_id\n File "C:\\jython2.5.2\\Lib\\Cookie.py", line 579, in
> __setitem__\n self.__set(key, rval, cval)\n File
> "C:\\jython2.5.2\\Lib\\Cookie.py", line 572, in _BaseCookie__set\n
> M.set(key, real_value, coded_value)\n File
> "C:\\jython2.5.2\\Lib\\Cookie.py", line 450, in set\n if "" !=
> translate(key, idmap, LegalChars):\n File
> "C:\\jython2.5.2\\Lib\\string.py", line 491, in translate\n return
> s.translate(table, deletions)\nTypeError: translate() takes 2 arguments (2
> given)\n'
> p11
> s.
>
> Looks like there is something wrong with the cookie setting? Any other
> ideas out there?
>
> Thanks for any tips.
>
> Once again -- it feels like we are getting closer (albeit slowly) to
> having a working modjy/Tomcat deploy-ready web2py.war -- that would be sooo
> awesome!
>
>
>
--