[web2py] Problems in web2py 1.83.2
Hi I have a problem since version 1.83.2. It gives me this error: Traceback (most recent call last): File D:\web2py\gluon\restricted.py, line 186, in restricted exec ccode in environment File D:/web2py/applications/init/controllers/default.py, line 91, in module File D:\web2py\gluon\globals.py, line 96, in lambda self._caller = lambda f: f() File D:/web2py/applications/init/controllers/default.py, line 55, in index name = check_login() File D:/web2py/applications/init/controllers/default.py, line 38, in check_login redirect(URL(r=request, f='../account/log_in')) File D:\web2py\gluon\html.py, line 226, in _URL return URL(*args, **kwargs) File D:\web2py\gluon\html.py, line 186, in URL raise SyntaxError, 'not enough information to build the url' SyntaxError: not enough information to build the url My codes worked up to version 1.82.1. I am using my own authorization/login codes which is in controllers/ account.py. The offending code (check_login function) is as follows: def check_login(session=session): if session.login_time == None: session.login_time = 0 if session.username == None or \ session.login_time + login_expiry * 3600 int(time.time()): redirect(URL(r=request, f='../account/log_in')) else: return session.username In version 1.82.1, check_login (called by http://localhost:8000/init) redirects to http://localhost:8000/init/account/login. But from version 1.83.2, it seems to redirect to http://localhost:8000/init/default/init/account/login which is non-existent. Any ideas what might be happening? Thanks Maurice Ling
Re: [web2py] Problems in web2py 1.83.2
If I remember correctly there was something about this on the list. I think you use the URL the wrong way and until version 1.83.2 the helper worked wrongly. In your case it worked but it has been corrected and it doesn´t work anymore. Try something like URL(c='account', f='log_in') Kenneth Hi I have a problem since version 1.83.2. It gives me this error: Traceback (most recent call last): File D:\web2py\gluon\restricted.py, line 186, in restricted exec ccode in environment File D:/web2py/applications/init/controllers/default.py, line 91, inmodule File D:\web2py\gluon\globals.py, line 96, inlambda self._caller = lambda f: f() File D:/web2py/applications/init/controllers/default.py, line 55, in index name = check_login() File D:/web2py/applications/init/controllers/default.py, line 38, in check_login redirect(URL(r=request, f='../account/log_in')) File D:\web2py\gluon\html.py, line 226, in _URL return URL(*args, **kwargs) File D:\web2py\gluon\html.py, line 186, in URL raise SyntaxError, 'not enough information to build the url' SyntaxError: not enough information to build the url My codes worked up to version 1.82.1. I am using my own authorization/login codes which is in controllers/ account.py. The offending code (check_login function) is as follows: def check_login(session=session): if session.login_time == None: session.login_time = 0 if session.username == None or \ session.login_time + login_expiry * 3600 int(time.time()): redirect(URL(r=request, f='../account/log_in')) else: return session.username In version 1.82.1, check_login (called by http://localhost:8000/init) redirects to http://localhost:8000/init/account/login. But from version 1.83.2, it seems to redirect to http://localhost:8000/init/default/init/account/login which is non-existent. Any ideas what might be happening? Thanks Maurice Ling
Re: [web2py] Problems in web2py 1.83.2
2010/12/29 Kenneth Lundström kenneth.t.lundst...@gmail.com: If I remember correctly there was something about this on the list. I think you use the URL the wrong way and until version 1.83.2 the helper worked wrongly. In your case it worked but it has been corrected and it doesn´t work anymore. Hm. Isn't that technically a case of breaking backwards compatibility? -- Branko Vukelic stu...@brankovukelic.com http://www.brankovukelic.com/
Re: [web2py] Problems in web2py 1.83.2
I might be completly wrong but I think the way URL was used by Maurice was wrong, it should not have worked, but thanks to a bug in URL it worked the way Maurice wanted. So I guess it depends on how you look at it. Did it break backwards compatibility. If your are using a bug and somebody repairs that bug your application stops working. Kenneth 2010/12/29 Kenneth Lundström kenneth.t.lundst...@gmail.com: If I remember correctly there was something about this on the list. I think you use the URL the wrong way and until version 1.83.2 the helper worked wrongly. In your case it worked but it has been corrected and it doesn´t work anymore. Hm. Isn't that technically a case of breaking backwards compatibility?
Re: [web2py] Problems in web2py 1.83.2
2010/12/29 Kenneth Lundström kenneth.t.lundst...@gmail.com: If your are using a bug and somebody repairs that bug your application stops working. I agree completely. However, it's a tricky situation if you insist on ever-backwards-compatible. You only insist on that because you don't want to break people's apps. Yet a bug fix may sometimes do just that. -- Branko Vukelic stu...@brankovukelic.com http://www.brankovukelic.com/
Re: [web2py] Problems in web2py 1.83.2
I guess not even web2py is perfect. Maybe some day. Kenneth 2010/12/29 Kenneth Lundströmkenneth.t.lundst...@gmail.com: If your are using a bug and somebody repairs that bug your application stops working. I agree completely. However, it's a tricky situation if you insist on ever-backwards-compatible. You only insist on that because you don't want to break people's apps. Yet a bug fix may sometimes do just that.
Re: [web2py] Problems in web2py 1.83.2
2010/12/29 Kenneth Lundström kenneth.t.lundst...@gmail.com: I guess not even web2py is perfect. Maybe some day. Sure. I don't mind the bugs getting fixed. I just wanted to say that in a perfect world, you cannot expect backwards-compatibility-forever. :) -- Branko Vukelic stu...@brankovukelic.com http://www.brankovukelic.com/