[ZPatterns] AttributeError _v_cache
Steve Spicklemire
[email protected]
Thu, 18 Oct 2001 10:22:40 -0500
Hi Joachim,
Hmm... this is in my Rack.py for TransactionAgents-0.4
# Caching
def _v_cache(self):
self._v_Keeper
l =3D self._v_cache =3D {}
return l
_v_cache =3D ComputedAttribute(_v_cache)
__per_transaction_cache_attrs__ =3D ('_v_cache',)
I can't say I understand the code, but I probably should. (Hint: if you=20=
understand this deeply.. pitch in! ;-> ) However it *looks* like=20
_v_cache is actually defined *twice*. Once as a method of the class, and=20=
then as an attribute that is a "ComputedAttribute" wrapped version of=20
the original method. In any case, the attribute is clearly defined in=20
the class, so I can only guess that your instance is not using this=20
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=20=
> on a
> different zope server - same version 2.4.1, same ZPatterns. Installed=20=
> and
> filled the MySQL tables, and whenever I do some getItem, I get the=20
> Attribute
> error. I don't see any difference between the site, where I exportet=20=
> 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=FC=DFen
>
> Joachim Schmitz
>
> AixtraWare, Ing. B=FCro f=FCr Internetanwendungen
> H=FCsgenstr. 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