Ira Sher wrote at 2005-4-3 13:32 -0700:
... NameError: global name _getiter_ not defined...
if sorton == 'id':
res=[(row.id.split().pop(), row) for row in results]
res.sort()
return res
This doesn't work, either, in zope 2.7.4 or 2.7.5 with python 2.3.4
and 2.3.5 respectively, as far as
Ira Sher wrote at 2005-4-1 14:29 -0700:
I scoured the archives, and found mention of this problem, and a note
by you, Dieter saying it was a problem with the 2.7 beta (this was
back in May of 2004) but I can't find any subsequent mention of the
issue
Nobody mentioned it again -- until your
Dieter,
I actually put the list in because one of the last suggestions in the
archives to repair the problem had to do with enclosing the assignment
in a list. The original code was essentially:
if sorton == 'id':
res=[(row.id.split().pop(), row) for row in results]
res.sort()
return res
Ira Sher wrote:
There is no call to _getiter_, of course, in the script, but whenever
I use any for looping on the results, I get a variation of the above.
Any thoughts on this?
Hmm, I should have asked this in the first place, but can you post the
source code for your test python script?
Chris, the relevant section of the script looks like this:
zcat=context.Catalog
if spontype == 'none':
results = zcat(meta_type=mtype)
else:
results = zcat(meta_type=mtype,SB_sponsor_type=spontype)
if sorton == 'id':
res = []
rest = []
res = list(results)
Ira Sher wrote at 2005-3-31 01:05 -0700:
...
I've found some reference to the _getiter_ problem on the forum, but
the queries date from nearly a year ago, and there were no fixes at
the time (save to wait for 7.4 to come out of beta). Is anyone else
experiencing this? Is there a workaround? What
I scoured the archives, and found mention of this problem, and a note
by you, Dieter saying it was a problem with the 2.7 beta (this was
back in May of 2004) but I can't find any subsequent mention of the
issue, and the problem I'm having is on both a 2.7.4 and a 2.7.5
build.
thanks
ira
On Apr
Ira Sher wrote:
the time (save to wait for 7.4 to come out of beta). Is anyone else
experiencing this? Is there a workaround? What am I missing?
Can you paste a real traceback or two?
cheers,
Chris
--
Simplistix - Content Management, Zope Python Consulting
- http://www.simplistix.co.uk
Chris,
a traceback for a script (testy in this case, called from
testyer_html, as I've broken out the problem area and have been trying
to work around it) using a for loop on a zcatalog result looks like:
* Module ZPublisher.Publish, line 101, in publish
* Module ZPublisher.mapply, line