[ZCM] [ZC] 1743/ 2 Comment "for loop on a zcatalog query yields _getiter_ error"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Sun Apr 3 20:53:27 EDT 2005


Issue #1743 Update (Comment) "for loop on a zcatalog query yields _getiter_ error"
 Status Pending, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1743

==============================================================
= Comment - Entry #2 by efge on Apr 3, 2005 8:53 pm

Does this also happen on a freshly created catalog on the new instance? In other words, is it due to old stuff in you Data.fs?

Also please paste the full traceback and the exact script used to provoke it.

________________________________________
= Request - Entry #1 by Anonymous User on Apr 3, 2005 5:01 pm

in migrating a site from zope 2.5.1 (python 2.1.3) to two instances, one on zope 2.7.4 (python 2.3.4) and one on zope 2.7.5 (python 2.3.5), scripts using 'for' loops to iterate through a zcatalog query result have been failing with "NameError: global name '_getiter_' is not defined". _getiter_ isn't, obviously, a variable in use in the scripts themselves. The relevant snippet of python would be:

results = zcat(meta_type=whatever)
res=[(row.id.split().pop(), row) for row in results]
res.sort()
return res

Found a previous reference to this while Zope 2.7 was in beta, but the problem has either persisted, or reappeared.

thanks
ira
==============================================================



More information about the Zope-Collector-Monitor mailing list