Hi all This dtml instruction: <dtml-in expr="_.sequence.sort(myCatalog(),((_.string.split(ordper)[0],'nocase','asc' ),(_.string.split(ordper)[1],'nocase','asc')))" size=num start=query_start> Gives me (Zope 2.6.3) this error: Traceback (innermost last): Module ZPublisher.Publish, line 150, in publish_module Module ZPublisher.Publish, line 114, in publish Module Zope.App.startup, line 202, in zpublisher_exception_hook Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module OFS.DTMLMethod, line 127, in __call__ Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 443, in renderwb Module DocumentTemplate.DT_Util, line 201, in eval __traceback_info__: ordper Module <string>, line 2, in f Module DocumentTemplate.sequence.SortEx, line 103, in sort TypeError: unhashable type (Also, an error occurred while attempting to render the standard error message.) In Zope 2.5 this code works (no errors), why? Thanks Michele
Zanotti Michele wrote at 2004-1-14 15:04 +0100:
This dtml instruction:
<dtml-in expr="_.sequence.sort(myCatalog(),((_.string.split(ordper)[0],'nocase','asc' ),(_.string.split(ordper)[1],'nocase','asc')))" size=num start=query_start>
Gives me (Zope 2.6.3) this error: ... Module <string>, line 2, in f Module DocumentTemplate.sequence.SortEx, line 103, in sort TypeError: unhashable type (Also, an error occurred while attempting to render the standard error message.)
In Zope 2.5 this code works (no errors), why?
A bug: I expect line 103 (in "DocumentTemplate.sequence.SortEx") looks like: if not basic_type(akey): Change this to if not basic_type(type(akey)): Please file a bug report to "http://www.zope.org/Collectors/Zope". Zope 2.7 contains the same bug. -- Dieter
participants (2)
-
Dieter Maurer -
Zanotti Michele