I'm having some more problems with the ZCatalog in Zope 2.3.0
I've got a name error in the file UnTextIndex.py
Error Type: NameError Error Value: i
I believe this is occuring when the catalog tries to unindex an object that isn't currently indexed.
The traceback reports line 332:
File /usr/zope/zope-2_3_0/lib/python/SearchIndex/UnTextIndex.py, line 332, in removeForwardEntry
The line in question reads: LOG('UnTextIndex', ERROR, 'Unindex_objects tried to unindex nonexistent' ' document %s' % str(i))
The function never uses or declares i, however it does use documentId. I think perhaps the i should have been documentId but I thought i would check with you guys first.
What do you think?
-Andy
Andy Dawkins wrote:
I'm having some more problems with the ZCatalog in Zope 2.3.0
I've got a name error in the file UnTextIndex.py
Error Type: NameError Error Value: i
I believe this is occuring when the catalog tries to unindex an object that isn't currently indexed.
The traceback reports line 332:
File /usr/zope/zope-2_3_0/lib/python/SearchIndex/UnTextIndex.py, line 332, in removeForwardEntry
The line in question reads: LOG('UnTextIndex', ERROR, 'Unindex_objects tried to unindex nonexistent' ' document %s' % str(i))
The function never uses or declares i, however it does use documentId. I think perhaps the i should have been documentId but I thought i would check with you guys first.
What do you think?
You're right. In an earlier version in CVS, all the variables called "documentId" were called "i". I guess this one just missed the search-replace :-) Of course, documentId makes for much more readable code; although "i" is faster to type :)
Change it to documentId and you'll be fine.
-- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
Steve is right, though I fixed that problem when it snuck up on me, but apparantly it never got merged into the branches correctly. Don't we all love CVS?
I personally had a problem with using 'i' as anything but a iterator variable.
Chris -- | Christopher Petrilli | petrilli@digicool.com ----- Original Message ----- From: "Steve Alexander" steve@cat-box.net To: "Andy Dawkins" andyd@nipltd.com Cc: zope-dev@zope.org; chrisw@nipltd.com; johnc@nipltd.com; "Christopher Petrilli" petrilli@digicool.com Sent: Monday, January 29, 2001 7:19 AM Subject: Re: [Zope-dev] 2.3.0. Unindex_object Tried To Unindex Nonexistent
Andy Dawkins wrote:
I'm having some more problems with the ZCatalog in Zope 2.3.0
I've got a name error in the file UnTextIndex.py
Error Type: NameError Error Value: i
I believe this is occuring when the catalog tries to unindex an object that isn't currently indexed.
The traceback reports line 332:
File /usr/zope/zope-2_3_0/lib/python/SearchIndex/UnTextIndex.py, line 332, in removeForwardEntry
The line in question reads: LOG('UnTextIndex', ERROR, 'Unindex_objects tried to unindex nonexistent' ' document %s' % str(i))
The function never uses or declares i, however it does use documentId. I think perhaps the i should have been documentId but I thought i would check with you guys first.
What do you think?
You're right. In an earlier version in CVS, all the variables called "documentId" were called "i". I guess this one just missed the search-replace :-) Of course, documentId makes for much more readable code; although "i" is faster to type :)
Change it to documentId and you'll be fine.
-- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
Christopher Petrilli wrote:
Steve is right, though I fixed that problem when it snuck up on me, but apparantly it never got merged into the branches correctly. Don't we all love CVS?
I personally had a problem with using 'i' as anything but a iterator variable.
Right, okay, patched Zope as described in this thread. Now, every so often I get something like the following showing up on the console:
------ 2001-02-09T12:59:33 ERROR(200) UnTextIndex unindex_object tried to unindex nonex istent document 11 ------ 2001-02-09T12:59:33 ERROR(200) UnTextIndex unindex_object tried to unindex nonex istent document 13 ------ 2001-02-09T12:59:34 ERROR(200) UnTextIndex unindex_object tried to unindex nonex istent document 13
What does this mean? Should I be worried about it? It looks like I should :-S
Any help would be appreciated,
cheers,
Chris
Steve Alexander wrote:
The line in question reads: LOG('UnTextIndex', ERROR, 'Unindex_objects tried to unindex nonexistent' ' document %s' % str(i))
Well, okay changing I makes to work, but this code looks liek something bad has happened anyway.
AFAIK, Andy wasn't doing anything 'bad' when he found this.
When should this code be legitimately be executed, nad why is it being logged as an error if that can happen?
confusedly,
Chris