The only thing that comes to mind is if you try store an object in the
session. The object may be an instance of class that you define and
therefore web2py succeeds in storing the session but fails to retrieve
it because the class is not yet defined (or imported) at the time when
the session is retrieved (before your user code it executed).

You can only store primitive types in session, not objects.

On Jun 5, 9:04 pm, João Ventura <[email protected]> wrote:
> Hello everyone,
>
> i've searched a lot but couldn't find any answer to the following: I'm
> developing a web application, and i rely heavily on sessions, storing
> all the user data on a session while the user uses a jquery tab
> interface. The problem is that sometimes web2py loses the session
> object, and it is almost in the same manner. I've checked my code many
> times and i don't mess with the session object.
>
> But as web2py does manage sessions automatically, i see that the first
> time i use the app, web2py creates a session file in the session
> folder. And when the contents of the first session disappears, when i
> check the "sessions" folder, the previous session file is there with
> all its contents, but now there's a new (empty) session file.
>
> I can't give a simple example how to replicate the error, but i think
> web2py shouldn't lose the first session, because:
> - I haven't explicitely called anything like "session.forget()" that
> could influence.
> - I haven't opened any other browser instance, tab or any other
> browser at all.
>
> Anybody knows anything about this?
>
> Thanks,
> João Ventura

Reply via email to