ZPatterns: bug in DataSkins.py
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. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
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: AttributeError: _v_currentSheets Traceback (innermost last): File /usr/local/zope/SiteBox/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/zope/SiteBox/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/zope/SiteBox/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: address-964970042) File /usr/local/zope/SiteBox/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/zope/SiteBox/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: content_html) File /usr/local/zope/SiteBox/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: content_html) File /usr/local/zope/SiteBox/lib/python/OFS/DTMLMethod.py, line 167, in __call__ (Object: content_html) File /usr/local/zope/SiteBox/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: content_html) File /usr/local/zope/SiteBox/lib/python/DocumentTemplate/DT_In.py, line 636, in renderwob (Object: propertysheets) File /usr/local/zope/SiteBox/lib/python/OFS/PropertySheets.py, line 654, in __len__ (Object: Traversable) File /usr/local/zope/SiteBox/lib/python/Products/ZPatterns/PropertySheets.py, line 11, in __propsets__ (Object: Traversable) AttributeError: (see above) -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
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.
participants (2)
-
Phillip J. Eby -
Steve Alexander