[Zope-CMF] zopefind problem?

marc lindahl marc@bowery.com
Mon, 04 Jun 2001 13:43:05 -0400


> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--MS_Mac_OE_3074506985_224170_MIME_Part
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit

Very strange.... script runs fine.  I modified it to print something always
so I knew it ran OK.  In fact, running zopeFind from the ZMI form with
nothing in the ID field seems to repeat the search for ids of 'pp', but with
no errors.  In fact if I put anything in the id field it gives me that
error, and then putting nothing in the field acts as if I was searching for
id pp.  I tried putting 'pp' in the external method, it still runs OK.
Wierd.... could it be some f**ked up caching in the Mac NS4 I'm using?
Anyway, not a huge deal right now, I know where most things are in my DB :)

> From: Tres Seaver <tseaver@palladion.com>
> Date: Mon, 04 Jun 2001 06:25:15 -0400
> To: marc lindahl <marc@bowery.com>, zope-cmf@zope.org
> Subject: Re: [Zope-CMF] zopefind problem?
> 
> marc lindahl wrote:
> 
>> Ug!  I have brain damage today!
>> 
>> (Object: FindObjectWithNoName)
>> (Info: ((<PortalFolder instance at 8a683f0>,), {}, None))
>> File /usr/local/zope/Zope-2.3.1/Extensions/zopefind_test.py, line 6, in
>> FindObjectWithNoName
>> (Object: Traversable)
>> TypeError: not enough arguments; expected 2, got 1
> 
> 
> This is my bad:  ZopeFind needs a mandatory second argument, which
> can be defaulted to self:
> 
> 
>>> for id, obj in self.ZopeFind():
> 
> 
> Should be:
> 
> for id, obj in self.ZopeFind( self ):
> 
> 
>>> if not hasattr( aq_base( obj ), 'getId' ):
>>> nameless.append( id )
>>> return string.join( nameless, '\n' )
> 
> Tres.
> -- 
> ===============================================================
> Tres Seaver                                tseaver@digicool.com
> Digital Creations     "Zope Dealers"       http://www.zope.org
> 
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
> 
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
> requests


--MS_Mac_OE_3074506985_224170_MIME_Part
Content-type: text/plain; name="zopefind_test.py";
 x-mac-creator="414C4641";
 x-mac-type="54455854"
Content-disposition: attachment
Content-transfer-encoding: base64

aW1wb3J0IHN0cmluZwpmcm9tIEFjcXVpc2l0aW9uIGltcG9ydCBhcV9iYXNlCgpkZWYgRmlu
ZE9iamVjdFdpdGhOb05hbWUoIHNlbGYgKToKICAgIG5hbWVsZXNzID0gWydOYW1lbGVzcyBP
YmplY3RzOiddCiAgICBmb3IgaWQsIG9iaiBpbiBzZWxmLlpvcGVGaW5kKCBzZWxmLCBvYmpf
aWRzPVsncHAnXSApOgogICAgICAgaWYgbm90IGhhc2F0dHIoIGFxX2Jhc2UoIG9iaiApLCAn
Z2V0SWQnICk6CiAgICAgICAgICAgIG5hbWVsZXNzLmFwcGVuZCggaWQgKQogICAgcmV0dXJu
IHN0cmluZy5qb2luKCBuYW1lbGVzcywgJ1xuJyApCg==

--MS_Mac_OE_3074506985_224170_MIME_Part--