[Zope-dev] MemoryError : Not WebDAV, but string a problem :-(

Chris Withers chrisw@nipltd.com
Mon, 23 Jul 2001 11:45:26 +0100


Chris Withers wrote:
> 
> Error Type: MemoryError
> Error Value:
>
>     (Object: guarded_getitem)
>   File /usr/local/zope/2.4.0b3_base/lib/python/AccessControl/ZopeGuards.py, line 109, in guarded_getattr
> AttributeError: (see above)


It's the following code from a Python Script that's causing it:

catalog = context.Catalog
SourceTitle = _['SourceTitle']

brains = catalog.searchResults(SourceTitle=SourceTitle,
                               sort_on = 'SortNo')

#while brains[0].SortNo==0:
#   brains = brains[1:]

return brains

If I uncomment those two lines, I get the MemoryError. It's not very helpful.
How can I do what I want to do?

cheers,

Chris