-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
session.destroy() throws an error - AttributeError: 'KVSession' object has no attribute 'sid_s' #2
Comments
Hey, thanks for reporting the issue. Can you please check if the one-line fix of c58e4ca resolves the issue? |
Thanks. I made the same fix earlier and it works. Thanks for the quick fix, appreciate it. |
Can you share some insight on how you triggered the error? Is it possible that open_session did not get called before? |
It is very likely that I made a mistake and called session.destroy() in the before_request method, where the open session may not have been called yet. Do I have to explicitly call open_session or is it handled by the application? |
It's called by flask itself, as part of the API. See http://flask.pocoo.org/docs/api/#flask.sessions.SessionInterface.open_session |
Either way, is it not a good idea to initialize the var anyway? |
No, because if you're not supposed to/allowed to call it before the The "best" way would probably be finding out if the session has been On Mon, Dec 19, 2011 at 8:06 AM, Bharadwaj Parthasarathy
|
Agreed, Thanks. Just wrapped it in try catch for now. Where should I post questions about flask KV session? Is there a mailing list? |
For feedback, write me a message on github or if need be, open an issue. That's easiest to handle. Since this extension is so small in scope, a mailinglist or anything else seems like overkill at the moment. |
Should the init method set sid_s?
Rough output from error page.
The text was updated successfully, but these errors were encountered: