Hi!
It's still broken for me.
googlecode 7a1ff6228799
I have a session in db. If I didn't check the Remember me than I get
Traceback (most recent call last):
File "/home/gyszabolcs/fejlesztes/web2py/gluon/restricted.py", line 217,
in restricted
exec ccode in environment
File
"/home/gyszabolcs/fejlesztes/web2py/applications/web2print/controllers/default.py",
line 134, in <module>
File "/home/gyszabolcs/fejlesztes/web2py/gluon/globals.py", line 358, in
<lambda>
self._caller = lambda f: f()
File
"/home/gyszabolcs/fejlesztes/web2py/applications/web2print/controllers/default.py",
line 17, in user
return dict(form=auth())
File "/home/gyszabolcs/fejlesztes/web2py/gluon/tools.py", line 1293, in
__call__
return getattr(self, args[0])()
File "/home/gyszabolcs/fejlesztes/web2py/gluon/tools.py", line 2249, in
login
self.login_user(user)
File "/home/gyszabolcs/fejlesztes/web2py/gluon/tools.py", line 1871, in
login_user
current.session.renew(clear_session=not
self.settings.keep_session_onlogin)
File "/home/gyszabolcs/fejlesztes/web2py/gluon/globals.py", line 889, in
renew
rows = db(table.id==record_id)(table.unique_key==unique_key)\
NameError: global name 'db' is not defined
In a model:
db = DAL(settings.database_uri, pool_size=2)
session.connect(request, response, db=db)
2013. augusztus 22., csütörtök 9:37:22 UTC+2 időpontban Massimo Di Pierro a
következőt írta:
>
> I think it is solved in trunk (committed to googlecode only, github is
> down today).
>
> On Thursday, 22 August 2013 02:16:20 UTC-5, David Marko wrote:
>>
>> I know there are some changes in session internals in trunk, so just
>> reporting an issue I observed. When I login using 'Remember me' checked,
>> I'm getting this error below. Without 'remember me' its working just fine.
>> I tried to remove all session files but still the same consistent behaviour
>> ...
>>
>> Traceback
>>
>> 1.
>> 2.
>> 3.
>> 4.
>> 5.
>> 6.
>> 7.
>> 8.
>> 9.
>>
>> Traceback (most recent call last):
>> File "C:\java\web2py\gluon\restricted.py", line 217, in restricted
>> exec ccode in environment
>> File "C:/java/web2py/applications/gapps/models/03_db.py"
>> <http://web2py2.tcl-digitrade.com/admin/default/edit/gapps/models/03_db.py>,
>> line 49, in <module>
>> auth = Auth(db)
>> File "C:\java\web2py\gluon\tools.py", line 1229, in __init__
>> auth.expiration
>> KeyError: 'session_id_gapps'
>>
>> Error snapshot [image:
>> help]<http://web2py2.tcl-digitrade.com/admin/default/ticket/gapps/127.0.0.1.2013-08-22.09-11-58.ff9c728c-27f4-4f34-bddc-23c433cef9fe#>
>>
>> <type 'exceptions.KeyError'>('session_id_gapps')
>>
>> inspect attributes
>> Frames
>>
>> -
>>
>> *File C:\java\web2py\gluon\restricted.py in restricted at line 217*
>> code arguments variables
>> -
>>
>> *File C:\java\web2py\applications\gapps\models\03_db.py in <module>
>> at line 49* code arguments variables
>> -
>>
>> *File C:\java\web2py\gluon\tools.py in __init__ at line 1229* code
>> arguments variables
>> Function argument list
>>
>> (self=<gluon.tools.Auth object>, environment=<DAL
>> uri="sqlite://storage.sqlite">, db=<DAL uri="sqlite://storage.sqlite">,
>> mailer=True, hmac_key=None, controller='default', function='user',
>> cas_provider=None, signature=True, secure=False)
>> Code listing
>>
>> 1224.
>> 1225.
>> 1226.
>> 1227.
>> 1228.
>> 1229.
>>
>> 1230.
>> 1231.
>> 1232.
>> 1233.
>>
>> # for "remember me" option
>> response = current.response
>> if auth and auth.remember:
>> # when user wants to be logged in for longer
>> response.cookies[response.session_id_name]["expires"] = \
>> auth.expiration
>>
>> if signature:
>> self.define_signature()
>> else:
>> self.signature = None
>>
>>
>>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.