Error Value: global name 'has' is not defined
Hi all, I have done a little zclass, in his addForm method I have this instruction: <dtml-in expr="restrictedTraverse('/Control_Panel/Products/myProduct/myClass/property sheets/common/myProperties').getProperty('types')"> In Zope 2.3.3 everything works, but in Zope 2.4.1 I have this error: Error Type: NameError Error Value: global name 'has' is not defined <!-- Traceback (innermost last): File F:\PROGRA~1\ZOPHOC~1\lib\python\ZPublisher\Publish.py, line 223, in publish_module File F:\PROGRA~1\ZOPHOC~1\lib\python\ZPublisher\Publish.py, line 187, in publish File F:\PROGRA~1\ZOPHOC~1\lib\python\Zope\__init__.py, line 226, in zpublisher_exception_hook (Object: Traversable) File F:\PROGRA~1\ZOPHOC~1\lib\python\ZPublisher\Publish.py, line 171, in publish File F:\PROGRA~1\ZOPHOC~1\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: m_ewdSetProoperties) File F:\PROGRA~1\ZOPHOC~1\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: m_ewdSetProoperties) File F:\PROGRA~1\ZOPHOC~1\lib\python\OFS\DTMLMethod.py, line 194, in __call__ (Object: m_ewdSetProoperties) File F:\PROGRA~1\ZOPHOC~1\lib\python\DocumentTemplate\DT_String.py, line 546, in __call__ (Object: m_ewdSetProoperties) File F:\PROGRA~1\ZOPHOC~1\lib\python\DocumentTemplate\DT_In.py, line 694, in renderwob (Object: restrictedTraverse('Control_Panel/Products/extMsWordDocument/extMsWordDocume nt/propertysheets/common/contentProperties').getProperty('types')) File F:\PROGRA~1\ZOPHOC~1\lib\python\DocumentTemplate\DT_Util.py, line 231, in eval (Object: restrictedTraverse('Control_Panel/Products/extMsWordDocument/extMsWordDocume nt/propertysheets/common/contentProperties').getProperty('types')) (Info: restrictedTraverse) File <string>, line 2, in f (Object: guarded_getattr) File F:\PROGRA~1\ZOPHOC~1\lib\python\OFS\Traversable.py, line 233, in restrictedTraverse (Object: Traversable) File F:\PROGRA~1\ZOPHOC~1\lib\python\OFS\Traversable.py, line 193, in unrestrictedTraverse (Object: Traversable) NameError: (see above) --> Can you help me? Many thanks Michele
this is a bug in Zope-2.4.1 final, I run into it using the ZSyncer-product and Steve Alexander found it. Here is the fix: in lib/python/OFS/Traversable.py after line 144: get=getattr insert: has=hasattr and restart Zope. On Thu, 13 Sep 2001, Zanotti Michele wrote:
Hi all, I have done a little zclass, in his addForm method I have this instruction:
<dtml-in expr="restrictedTraverse('/Control_Panel/Products/myProduct/myClass/property sheets/common/myProperties').getProperty('types')"> In Zope 2.3.3 everything works, but in Zope 2.4.1 I have this error: Error Type: NameError Error Value: global name 'has' is not defined <!-- <snip> Can you help me? Many thanks Michele
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
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
On Fri, Sep 14, 2001 at 08:33:19AM +0200, Joachim Schmitz wrote:
this is a bug in Zope-2.4.1 final, I run into it using the ZSyncer-product and Steve Alexander found it. Here is the fix:
in lib/python/OFS/Traversable.py
after line 144:
get=getattr insert: has=hasattr
ZCollector? Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
On Fri, Sep 14, 2001 at 09:42:14AM +0100, Chris Withers wrote:
Oleg Broytmann wrote:
ZCollector?
...is broken ;-)
Does not support Zope 2.4? :) Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
participants (4)
-
Chris Withers -
Joachim Schmitz -
Oleg Broytmann -
Zanotti Michele