Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
From: Marius Scurtescu <mariuss@li...> - 2003-01-26 02:52:24
I am trying to use session management as in the autosession.py
example file. I have to save a large tree structure on the
The example works like a charm, but when I was trying to
save my object it did not work. The session was not saved
and on every request a new session was started.
After a long while I realized that Spyce did not like the
size of my object. It did not complain, it just did not
If my tree structure is bigger than around 200 characters then
it won't be saved.
Is there a setting somewhere to increase this limit?
>I am trying to use session management as in the autosession.py example
>file. I have to save a large tree structure on the session. The example
>works like a charm, but when I was trying to save my object it did not
>work. The session was not saved and on every request a new session was
>started. After a long while I realized that Spyce did not like the size
>of my object. It did not complain, it just did not save it. If my tree
>structure is bigger than around 200 characters then it won't be saved. Is
>there a setting somewhere to increase this limit?
Have a look at .../spyce/modules/session.py. In there, search for
session_dir. That's the session handler that you are using. The problem is
somewhere in the set() method. Notice how there is a big try-except block
around everything? Well, in the except part, there is a raise at end. So,
any exception should be re-raised and propagated upwards. Namely, under
normal circumstances, you should be seeing the error in setting the
In the case of automatic session management, the set() function is called
from the session module's finish() method (near the top of the same file),
which is called during the finish portion of the request processing. For
details on how modules work, refer to:
During this finish processing, each of the modules are finish()ed in
opposite order of their initialization, but any exceptions that they might
throw are simply thrown on the floor. Modules should really be written so
that they do NOT throw exceptions in the start() or finish() methods.
(Perhaps this should be changed, but there are good reasons motivating
In any case, returning to your problem... The problem is that you are not
seeing this exception in the output. The reason is that it's occuring
during finalization. To see what's really going on temporarily add the
following line to the end of your Spyce file.
[[ session.finish() ]]
... and let us know.
All the best,