> Another intermediate fix would be to store the data of the cart
> as a series
> of dictionaries, lists and strings. e.g., don't store the cart directly.
Good hint. This way it was pretty easy:
Instead of:
session.setValue("cart", cart)
this way:
session.setValue("cart", pickle.dumps(cart))
Restore:
cart = pickle.loads(session.value("cart"))
instead of:
cart = session.value("cart")
Regards
Franz
> -----Ursprüngliche Nachricht-----
> Von: webware-discuss-admin@...
> [mailto:webware-discuss-admin@... Auftrag von Chuck
> Esterbrook
> Gesendet: Dienstag, 15. Mai 2001 15:22
> An: fgeiger@...; Webware-discuss
> Betreff: Re: [Webware-discuss] ImportError while using OneShot: No
> module named Cart
>
>
> At 05:37 PM 5/13/2001 +0200, F. GEIGER wrote:
> >Sorry, I forgot: Probably of interest: My config file.
> >
> >Probably an important detail: If I run the app using the app servers an
> >WebKit, I first have to delete the session file. Otherwise I get
> the *same*
> >error. After having deleted it, the app runs fine with the servers.
>
> The problem is that you have a pickled object of a user-defined class in
> your session file which, the last time we checked, caused the kind of
> problem you are describing.
>
> I thought we speculated that when we switched from exec'ing servlets to
> importing them, that this problem would be more approachable. However, no
> one has put any time into it.
>
> As an intermediate fix, you could switch your session store to be purely
> memory. This has the disadvantage that if you restart the app server, you
> lose your data.
>
> Another intermediate fix would be to store the data of the cart
> as a series
> of dictionaries, lists and strings. e.g., don't store the cart directly.
>
> At some point, this should get fixed, but it's not on *my* radar for the
> next few weeks.
>
> -Chuck
>
>
> _______________________________________________
> Webware-discuss mailing list
> Webware-discuss@...
> http://lists.sourceforge.net/lists/listinfo/webware-discuss
>
|