New issue 16 by HBenferhat: can't delete sessions
http://code.google.com/p/gaeutilities/issues/detail?id=16
What steps will reproduce the problem?
1. self.sess.delete()
2. self.sess = sessions.Session()
3.
What is the expected output? What do you see instead?
session will be deleted and then a new one created next time you call
sessions.Session()
What version of the product are you using? On what operating system?
1.1.3, production
Please provide any additional information below.
Traceback (most recent call last):
File
"/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line
501, in __call__
handler.get(*groups)
File "/base/data/home/apps/gaeutilities/1.331269697763903928/main.py",
line 57, in get
self.sess = sessions.Session()
File
"/base/data/home/apps/gaeutilities/1.331269697763903928/appengine_utilities
/sessions.py", line 173, in __init__
self.sid = self.new_sid()
File
"/base/data/home/apps/gaeutilities/1.331269697763903928/appengine_utilities
/sessions.py", line 232, in new_sid
sid = str(self.session.key()) + md5.new(repr(time.time()) + \
AttributeError: 'NoneType' object has no attribute 'key'
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Comment #1 on issue 16 by bowman.joseph: can't delete sessions
http://code.google.com/p/gaeutilities/issues/detail?id=16
I'll take a look at this and have a fix as soon as I can. I might get some
time to
work on this tomorrow evening, otherwise won't be until tue/wed next week.
The problem is the fact that the session is deleted and the next request is
getting a
key that doesn't exist, and not creating a new session object before trying
to get
the key()
The fix will be: (sorry writing this by hand, no opportunity to do a diff)
At line 172 in sessions.py:
# start a new session
+ self.session = _AppEngineUtilities_Session()
+ self.session.put()
self.sid = self.new_sid()
I haven't gotten any volunteers for testing the cookie changes in trunk, so
the next
release may be a little bumpy, but it will include this fix as well. I'll
have it up asap
Comment #2 on issue 16 by bowman.joseph: can't delete sessions
http://code.google.com/p/gaeutilities/issues/detail?id=16
This was fixed in version 1.2