[Zope] Function sequence.sort
julian
jules12af at aol.com
Mon Jun 4 09:58:16 EDT 2007
Hi, I have a problem with a script that run with zope2.7. This same
script don't run with zope 2.9 ????
My error :
----------------------------------------------------------------------
2007-06-04T15:31:05 ERROR Zope.SiteErrorLog
http://zope.mysite.com:17673/SITES/plone_site/vie-quotidienne/ind
ex_html/ecoles
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 41, in call_object
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.PythonScripts.PythonScript, line 325, in _exec
Module None, line 13, in ecoles
- <PythonScript at /SITES/plone_site/vie-quotidienne/index_html/ecoles>
- Line 13
Module DocumentTemplate.sequence.SortEx, line 121, in sort
TypeError: mybrains.__cmp__(x,y) requires y to be a 'mybrains', not a
'ImplicitAcquirerWrapper'
---------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
The script:
------------------------------------------------------------------------------------
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
RESPONSE = request.RESPONSE
query = {'portal_type' : 'J_Product',
'review_state' : 'published',
}
resultat_ecole = context.portal_catalog.searchResults(query)
sort_on_pr = ()
tri_ecole =sequence.sort(resultat_ecole, sort_on_pr)
return tri_ecole
-------------------------------------------------------------------------------------
Julian
More information about the Zope
mailing list