[Zope] Re: Session object duplicate key
Garikoitz Araolaza
gari@eibar.org
Thu, 03 Oct 2002 10:20:19 +0200
--- In zope@y..., peter sabaini <sabaini@i...> wrote:
> fwiw, i also had this exception but havent been able to reproduce it
> /home/csmant/zope/2.5.1/lib/python/Products/Transience/Transience.py,
> > line 159, in new
> > (Object: session_data)
> > KeyError: duplicate key 55677973A0ffDLw6-UQ
I think that I could find the "bug" causing this problem.
I was calling a method that summed-up the actual item number accessing
to the SESSION object.
<dtml-if "itemNumber()>1">
Items in cart: <dtml-var itemNumber>
<dtml-elif "itemNumber()==1">
One item in cart
<dtml-else>
</dtml-if>
So, I was calling more than once the same PyScript in each request.
No I do:
<dtml-let items="itemNumber()">
<dtml-if "items>1">
Items in cart: <dtml-var items>
<dtml-elif "items==1">
One item in cart
<dtml-else>
</dtml-if>
</dtml-let>
And it works fine!!!
Is it a bug or a feature?
Gari
_________________________________________
Garikoitz Araolaza
gari@eibar.org