[Zope-dev] ZPatterns: bug in DataSkins.py

Phillip J. Eby pje@telecommunity.com
Sun, 30 Jul 2000 16:07:41 -0500


At 08:07 PM 7/30/00 +0100, Steve Alexander wrote:
>Steve Alexander wrote:
>> 
>> I'm using ZPatterns 0.4.1snap1.
>> 
>> DataSkins.py line 377
>> method _v_currentSheets(self,_v_dm_=_v_dm_)
>> 
>>     l.extend(list(sp._PropertySheetsFor(client)))
>> 
>> However, the variable "client" isn't declared elsewhere.
>
>..and when I replace it with "self", I get this error when I try to
>iterate through a dataskin's propertysheets:
>

Would you try something for me?  Stick a routine in that class, call it
getCurrentSheets(), with exactly the same code as the _v_currentSheets
method, then call it from your code in place of iterating through
propertysheets?  I have a feeling it'll provide a clearer error message.
(That's the only problem with ComputedAttributes - errors that break them
manifest as AttributeErrors, hiding the true error.)  Thanks.