[Zope] bug with File Library example on 2.7.0

Dieter Maurer dieter at handshake.de
Tue Feb 17 14:03:45 EST 2004


Thomas Anderson wrote at 2004-2-15 23:23 -0500:
>Running Zope 2.7.0 / python 2.3.3
>I ran into a bug with the File Library example app.
>When you click on the column headers twice to resort in reverse you get
>an error:
>
>Error Type: ValueError
>Error Value: An integer was expected in the value 'True'
>
>The url causing the problem is:
>.../FileLibrary/index_html?sort=date&reverse:int=True
>
>
>
>On Zope 2.6.3 / python 2.2.2 the example works and the URL is:
>
>.../FileLibrary/index_html?sort=date&reverse:int=1

A Python 2.3 issue:

  Python 2.3 returns booleans for comparisons


You have 2 options:

  *  Find the code that generates the URL above
     and call the "int" function on "True"
     (this will give you back the "1").

  *  Extend the "int" converter ("field2int") in "ZPublisher.Converters"
     to handle "True" and "False".

-- 
Dieter



More information about the Zope mailing list