Thanks, Massimo. It works, now. I think you forgot lines 153 and 154 printing information about cookie and session, or is it supposed to be there?
-- Vinicius Assef On Tue, Nov 27, 2012 at 1:50 PM, Massimo Di Pierro <massimo.dipie...@gmail.com> wrote: > This is fixed in trunk. It is not not a problem with webclient. It is a > problem with sessions. In 2.2.1 if you visit a page for the first time and > do not save anything in the session, the session file is not save. When you > visit another page another session id is created and webclient thinks the > session is broken. This has been fixed in trunk. Now web2py recycles the > session id even if the session file is not found. > > > On Tuesday, 27 November 2012 09:31:15 UTC-6, viniciusban wrote: >> >> I'm trying to running gluon/contrib/webclient.py as is (i.e, with no >> modification) and I'm getting this error: >> >> -------- start here --------- >> $ python webclient.py >> Traceback (most recent call last): >> File "webclient.py", line 205, in <module> >> test_web2py_registration_and_login() >> File "webclient.py", line 180, in test_web2py_registration_and_login >> client.post('user/register', data=data) >> File "webclient.py", line 61, in post >> self.get(url, cookies=cookies, headers=headers, auth=auth) >> File "webclient.py", line 51, in get >> return self.post(url, data=None, cookies=cookies, headers=headers) >> File "webclient.py", line 154, in post >> raise RuntimeError('Broken sessions %s' % name) >> RuntimeError: Broken sessions welcome >> ---------- the end ------------- >> >> Any ideas to fix it? >> >> -- >> Vinicius Assef > > -- > > > --