[Zope] ImportError on Zope 2.3.0 alpha 1
Wolfgang Strobl
ws@gmd.de
Thu, 28 Dec 2000 10:19:05 +0100
The following method worked on 2.2.4, but fails on 2.3.0a1:
<dtml-call "REQUEST.set('newdoc','tdoc')">
<dtml-call
"manage_addProduct['OFSP'].manage_addDTMLDocument(newdoc,newdoc,file
=URL)">
<dtml-with "_.getitem(newdoc)">
<dtml-call "manage_addProperty('newprop','hello','string')">
</dtml-with>
Actually, "manage_addProperty" doesn't seem to work at all, throwing an error
message like
Error Type: ImportError
Error Value: cannot import name checkValidId
Traceback (innermost last):
...
File /home/strobl/Zope-2.3.0a1-src/lib/python/OFS/PropertyManager.py, line
247, in _setProperty
(Object: testdoc)
ImportError: (see above)
Indeed, line 247 (and 248) contain a mistake. Changing
from ObjectManager import checkValidId
checkValidId(self, id)
to
from ObjectManager import check_valid_id
check_valid_id(self, id)
fixes the problem. A quick search only finds a single definition/use of
check_valid_id aka checkValidId. What do the Zope naming rules say about
how such a method has to be named?
On 11 Dec 2000, 16:59 Brian Lloyd wrote:
> http://www.zope.org/Products/Zope/2.3.0a1/
--
o ( Wolfgang.Strobl@gmd.de (+49 2241) 14-2394
/\ * GMD mbH #include
_`\ `_<=== Schloss Birlinghoven, <std.disclaimer>
__(_)/_(_)___.-._ 53754 Sankt Augustin, Germany ________________