[ZPatterns] AttributeError _v_cache
Joachim Schmitz
[email protected]
Thu, 18 Oct 2001 18:07:29 +0200 (CEST)
I am using Steve Alexanders Transactionagents-agents. And when I was looking
what version I was using on both servers, I found that the Transactionagents
product was not installed on my new server, cause I install products in
ZInstanceHome by adding a link to the real product directory after installing it everthing
works fine "arrrrgh"
thanks for the inspiration.
A question to Steve A. could you implement something in your
ZPatterns-version, that makes it break, if Transactionagents are not
installed.
On Thu, 18 Oct 2001, Steve Spicklemire wrote:
>
> Hi Joachim,
>
> Hmm... this is in my Rack.py for TransactionAgents-0.4
>
> # Caching
>
> def _v_cache(self):
> self._v_Keeper
> l = self._v_cache = {}
> return l
>
> _v_cache = ComputedAttribute(_v_cache)
>
> __per_transaction_cache_attrs__ = ('_v_cache',)
>
>
>
> I can't say I understand the code, but I probably should. (Hint: if you
> understand this deeply.. pitch in! ;-> ) However it *looks* like
> _v_cache is actually defined *twice*. Once as a method of the class, and
> then as an attribute that is a "ComputedAttribute" wrapped version of
> the original method. In any case, the attribute is clearly defined in
> the class, so I can only guess that your instance is not using this
> class definition. What version of ZPatterns are you using?
>
> -steve
>
> On Wednesday, October 17, 2001, at 10:07 AM, Joachim Schmitz wrote:
>
> > Hi,
> >
> > I exported a Specialist, with storage in a MySQL db, and imported it
> > on a
> > different zope server - same version 2.4.1, same ZPatterns. Installed
> > and
> > filled the MySQL tables, and whenever I do some getItem, I get the
> > Attribute
> > error. I don't see any difference between the site, where I exportet
> > from,
> > and where I imported to.
> >
> > the traceback is:
> >
> > File
> > /lib/python/DocumentTemplate/DT_Util.py,
> > line 231, in eval
> > (Object: REQUEST.set('item',User.getItem(user_id)))
> > (Info: REQUEST)
> > File <string>, line 2, in f
> > (Object: guarded_getattr)
> > File
> > /Products/ZPatterns/Specialists.py,
> > line 34, in getItem
> > (Object: ProviderContainer)
> > File
> > /Products/ZPatterns/Rack.py,
> > line 56, in getItem
> > (Object: ProviderContainer)
> > File
> > /Products/ZPatterns/Rack.py,
> > line 259, in _fromCache
> > (Object: ProviderContainer)
> > AttributeError: _v_cache
> >
> >
> > Mit freundlichen Grüßen
> >
> > Joachim Schmitz
> >
> > AixtraWare, Ing. Büro für Internetanwendungen
> > Hüsgenstr. 33a, D-52457 Aldenhoven
> > Telefon: +49-2464-8851, FAX: +49-2464-905163
> >
> >
> > _______________________________________________
> > ZPatterns mailing list
> > [email protected]
> > http://www.eby-sarna.com/mailman/listinfo/zpatterns
>
>
>
Mit freundlichen Grüßen
Joachim Schmitz
AixtraWare, Ing. Büro für Internetanwendungen
Hüsgenstr. 33a, D-52457 Aldenhoven
Telefon: +49-2464-8851, FAX: +49-2464-905163