Hi everyone, I'm using Zope with OpenFlow for a workflow. The problem I'm encountering now seems to be entirely related to Zope; actually, a particular value for a parameter generates the error, so I'm guessing there's something wrong with the data, not the script. There's a "browse" file defined in the workflow, with the following first lines: <html><body> <html> <body tal:define="results here/Catalog; qq request/QUERY_STRING; qs python:container.stripStart(qq); start request/start|python:0; batch python:modules['ZTUtils'].Batch(results, size=20, start=start); previous python:batch.previous; next python:batch.next"> Now, if I call this script with no parameters in the URL, it shows all documents. If I append a ?issuer=john.d parameter to the URL, only documents issued by john.d will be displayed. This works even for fictive names, displaying a blank table as a result. However, for a particular user (and only that one), I'm getting this error: Error Type: TALESError Error Value: exceptions.KeyError on -1882874846 in "<PythonExpr modules['ZTUtils'].Batch(results, size=20, start=start)>", at line 3, column 3 In the page source, this is the detailed debug information: <!-- Traceback (innermost last): File D:\Data\Zope\lib\python\ZPublisher\Publish.py, line 150, in publish_module File D:\Data\Zope\lib\python\ZPublisher\Publish.py, line 114, in publish File D:\Data\Zope\lib\python\Zope\__init__.py, line 159, in zpublisher_exception_hook (Object: Docs) File D:\Data\Zope\lib\python\ZPublisher\Publish.py, line 98, in publish File D:\Data\Zope\lib\python\ZPublisher\mapply.py, line 88, in mapply (Object: browse) File D:\Data\Zope\lib\python\ZPublisher\Publish.py, line 39, in call_object (Object: browse) File D:\Data\Zope\lib\python\Shared\DC\Scripts\Bindings.py, line 252, in __call__ (Object: browse) File D:\Data\Zope\lib\python\Shared\DC\Scripts\Bindings.py, line 283, in _bindAndExec (Object: browse) File D:\Data\Zope\lib\python\Products\PageTemplates\ZopePageTemplate.py, line 210, in _exec (Object: browse) File D:\Data\Zope\lib\python\Products\PageTemplates\PageTemplate.py, line 86, in pt_render (Object: browse) File D:\Data\Zope\lib\python\TAL\TALInterpreter.py, line 158, in __call__ File D:\Data\Zope\lib\python\TAL\TALInterpreter.py, line 191, in interpret File D:\Data\Zope\lib\python\TAL\TALInterpreter.py, line 402, in do_setLocal_tal File D:\Data\Zope\lib\python\Products\PageTemplates\TALES.py, line 247, in evaluate File D:\Data\Zope\lib\python\Products\PageTemplates\ZRPythonExpr.py, line 49, in __call__ (Info: modules['ZTUtils'].Batch(results, size=20, start=start)) File Python expression "modules['ZTUtils'].Batch(results, size=20, start=start)", line 2, in f File D:\Data\Zope\lib\python\ZTUtils\Zope.py, line 147, in __init__ File D:\Data\Zope\lib\python\ZTUtils\Batch.py, line 68, in __init__ File D:\Data\Zope\lib\python\ZTUtils\Batch.py, line 110, in opt File D:\Data\Zope\lib\python\ZTUtils\Zope.py, line 71, in __getitem__ File D:\Data\Zope\lib\python\AccessControl\ZopeGuards.py, line 90, in guarded_getitem File D:\Data\Zope\lib\python\Products\ZCatalog\Lazy.py, line 151, in __getitem__ File D:\Data\Zope\lib\python\Products\ZCatalog\Catalog.py, line 146, in __getitem__ TALESError: (see above) --> Unfortunately, all this is worse than Chinese to me. Any clue where the error may be, and what to do to fix it, please? Many thanks in advance! Titel
--On 16. August 2006 15:14:54 +0100 Tit-Liviu Leontin <theputerfixer@yahoo.com> wrote:
Error Type: TALESError Error Value: exceptions.KeyError on -1882874846 in "<PythonExpr modules['ZTUtils'].Batch(results, size=20, start=start)>", at line 3, column 3
D:\Data\Zope\lib\python\AccessControl\ZopeGuards.py, line 90, in guarded_getitem File D:\Data\Zope\lib\python\Products\ZCatalog\Lazy.py, line 151, in __getitem__ File D:\Data\Zope\lib\python\Products\ZCatalog\Catalog.py, line 146, in __getitem__ TALESError: (see above)
The KeyError looks like an inconsistent catalog. Try to recatalog everything. -aj
Thanks for the quick reply, Andreas. Please don't laugh now -- but how do I recatalog everything? :) I told you it's Chinese to me. Many thanks again, Titel ----- Original Message ---- From: Andreas Jung <lists@zopyx.com> To: Tit-Liviu Leontin <theputerfixer@yahoo.com>; zope@zope.org Sent: Wednesday, August 16, 2006 5:20:02 PM Subject: Re: [Zope] Parameter generating an exception? --On 16. August 2006 15:14:54 +0100 Tit-Liviu Leontin <theputerfixer@yahoo.com> wrote:
Error Type: TALESError Error Value: exceptions.KeyError on -1882874846 in "<PythonExpr modules['ZTUtils'].Batch(results, size=20, start=start)>", at line 3, column 3
D:\Data\Zope\lib\python\AccessControl\ZopeGuards.py, line 90, in guarded_getitem File D:\Data\Zope\lib\python\Products\ZCatalog\Lazy.py, line 151, in __getitem__ File D:\Data\Zope\lib\python\Products\ZCatalog\Catalog.py, line 146, in __getitem__ TALESError: (see above)
The KeyError looks like an inconsistent catalog. Try to recatalog everything. -aj
--On 16. August 2006 07:42:11 -0700 Tit-Liviu Leontin <theputerfixer@yahoo.com> wrote:
Thanks for the quick reply, Andreas. Please don't laugh now -- but how do I recatalog everything? :) I told you it's Chinese to me. Many thanks again, Titel
ZMI -> Catalog -> Advanced tab -> Update catalog. -aj
----- Original Message ----- From: "Tit-Liviu Leontin" <theputerfixer@yahoo.com> To: <zope@zope.org> Sent: Wednesday, August 16, 2006 10:42 AM Subject: Re: [Zope] Parameter generating an exception?
Thanks for the quick reply, Andreas. Please don't laugh now -- but how do I recatalog everything? :) I told you it's Chinese to me. Many thanks again,
Easy to do via the ZMI: click on the Catalog, then use the Advanced tab to clear the catalog (remove all existing entries) and then use the "Find Objects" tab to 'recatalog' everything. Warning: make a backup first!!! Jonathan
I will bounce this out since I tried this recently while testing an upgrade. We are on 2.7.5 and our 200K+ news articles are all ZClass objects and are cataloged. We setup a 2.8.6 instance and made sure all Products, Extension, etc. were the same. Copied our Data.fs and brought up the instance. I could browse around the site fine until I did anything that utilized the catalog to look up the news articles. Did not find anything. I could navigate directly to an article and it displayed fine. I then tried to clear the catalog and find objects of the zclass type....it found nothing. This has been a rather large stumbling block to us upgrading. Any ideas? No rush...no emergency ... but would like to upgrade sometime soon hopefully. thanks Allen Jonathan wrote:
----- Original Message ----- From: "Tit-Liviu Leontin" <theputerfixer@yahoo.com> To: <zope@zope.org> Sent: Wednesday, August 16, 2006 10:42 AM Subject: Re: [Zope] Parameter generating an exception?
Thanks for the quick reply, Andreas. Please don't laugh now -- but how do I recatalog everything? :) I told you it's Chinese to me. Many thanks again,
Easy to do via the ZMI: click on the Catalog, then use the Advanced tab to clear the catalog (remove all existing entries) and then use the "Find Objects" tab to 'recatalog' everything.
Warning: make a backup first!!!
Jonathan _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
----- Original Message ----- From: "Allen Schmidt Sr." <aschmidt@fredericksburg.com> To: <zope@zope.org> Sent: Wednesday, August 16, 2006 11:07 AM Subject: Re: [Zope] Parameter generating an exception? (also recatalogingissue)
I will bounce this out since I tried this recently while testing an upgrade.
We are on 2.7.5 and our 200K+ news articles are all ZClass objects and are cataloged. We setup a 2.8.6 instance and made sure all Products, Extension, etc. were the same. Copied our Data.fs and brought up the instance. I could browse around the site fine until I did anything that utilized the catalog to look up the news articles. Did not find anything. I could navigate directly to an article and it displayed fine.
I then tried to clear the catalog and find objects of the zclass type....it found nothing.
This has been a rather large stumbling block to us upgrading.
Any ideas? No rush...no emergency ... but would like to upgrade sometime soon hopefully.
Something changed in ZCatalog indexes between Zope 2.7 and 2.8, and you may be running in to a related problem. Google for 'manage_convertIndexes' (you can also read the CHANGES.txt for Zope 2.8) Jonathan
Allen Schmidt Sr. wrote at 2006-8-16 11:07 -0400:
... I then tried to clear the catalog and find objects of the zclass type....it found nothing.
When you clear the catalog, then it is cleared (i.e. empty). You won't find anything thereafter. You have to recatalog all objects that you want to be found by your catalog. I simple cases, you can do this via the catalog's "Find" tab. In more difficult cases, you need to write a script that uses "catalog_object" (maybe "index_object") for/on the objects to be catalogued. -- Dieter
Sorry. That is what I meant I did by trying to find the objects after clearing. The Find tab found none of those zclass objects. I am getting that test instance set back up again with our current Data.fs again and am going to try the manage_convertIndexes that Jonathan mentioned to see if that works. Thanks Allen Dieter Maurer wrote:
Allen Schmidt Sr. wrote at 2006-8-16 11:07 -0400:
... I then tried to clear the catalog and find objects of the zclass type....it found nothing.
When you clear the catalog, then it is cleared (i.e. empty). You won't find anything thereafter.
You have to recatalog all objects that you want to be found by your catalog. I simple cases, you can do this via the catalog's "Find" tab. In more difficult cases, you need to write a script that uses "catalog_object" (maybe "index_object") for/on the objects to be catalogued.
Allen Schmidt Sr. wrote at 2006-8-16 14:37 -0400:
Sorry. That is what I meant I did by trying to find the objects after clearing. The Find tab found none of those zclass objects.
This seams to indicate that your objects might raise some errors: "Products.ZCatalog.ZCatalog.ZCatalog.ZopeFindAndApply" contains some nasty "try: ... except: ..." statements (bah!) that may hide exceptions. -- Dieter
r.__cmp__(x,y) requires y to be a 'r', not a 'ImplicitAcquirerWrapper' http://www.zope.org/Collectors/Zope/1884 I see this is a pending case but does anyone have any idea if it will be fixed in future releases? Finally got a 2.8.8 instance running with our Data (from 2.7.5) and was able to run the catalog index fixer with help from Chris Withers (THANKS!!) and all was looking good. The pages that looked up news stories from the catalog are looking good. Then I went to a page that displayed Houses (from ZSQL methods) and does a sort on the results as is the case in MANY pages we have. The top line is the result on the error page. Seems its a well know bug but does not look like its an issue to most but it is to us. Any ideas?? Thanks Allen
--On 1. September 2006 07:46:33 -0400 "Allen Schmidt Sr." <aschmidt@fredericksburg.com> wrote:
r.__cmp__(x,y) requires y to be a 'r', not a 'ImplicitAcquirerWrapper'
http://www.zope.org/Collectors/Zope/1884 I see this is a pending case but does anyone have any idea if it will be fixed in future releases?
Finally got a 2.8.8 instance running with our Data (from 2.7.5) and was able to run the catalog index fixer with help from Chris Withers (THANKS!!) and all was looking good. The pages that looked up news stories from the catalog are looking good. Then I went to a page that displayed Houses (from ZSQL methods) and does a sort on the results as is the case in MANY pages we have. The top line is the result on the error page. Seems its a well know bug but does not look like its an issue to most but it is to us.
Bugs are fixed on a voluntary basis. The chance having it fixed for the next version is higher when you work on a patch and tests. I doubt that this issue has a high priority for most of the core developers. -aj
participants (5)
-
Allen Schmidt Sr. -
Andreas Jung -
Dieter Maurer -
Jonathan -
Tit-Liviu Leontin