ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> zope-Dev
zope-Dev
[Zope-dev] Re: ZCatalog fast as admin, dog slow as anonymous and other users
by Jason Spisak other posts by this author
Jan 30 2004 11:40PM messages near this date
[Zope-dev] Re: ZCatalog fast as admin, dog slow as anonymous and other users | [Zope-dev] Re: ZCatalog fast as admin, dog slow as anonymous and other users
Thanks.  I'll update the index, since it will eventually be in proper 
zope anyway, it'll just be a bit ahead it's time 8-)

Just to throw another wrench in, when updating the 'start' and 'end' 
indexes I get this error now that they are DateIndexes:

Site error

This site encountered an error trying to fulfill your request. The 
errors were:
Error Details

Error Type
IndexError

Error Value
string index out of range

So I'm guessing something that parses for these dates is blank and it 
doesn't like that too much.  Technically you should never have a blank 
start or end date, I guess.


Tres Seaver wrote:

>  Jason Spisak wrote:
>  
> > Tres and Seb,
> >
> > Got rid of all the date FieldIndexes and am reindexing the new 
> > DateIndexes one at a time from the indexes tab, but I've hit a snag.
> >
> > when I go to reindex 'expires' I get this error immediately:
> >
> > Site error
> >
> > This site encountered an error trying to fulfill your request. The 
> > errors were:
> > Error Details
> >
> > Error Type
> > OverflowError
> >
> > Error Value
> > integer multiplication
>  
>  
>  Update lib/python/Products/PluginIndexesn/DateIndex/DateIndex.py to the 
>  current head of the 2.6 branch, e.g. from:
>  
>  As a quick workaround, you could patch CMFDefault/DublinCore.py::
>  
>  ---------------- 8< -----------------------------------
>  *** CMFDefault/DublinCore.py    14 Nov 2002 06:48:20 -0000      1.19.4.3
>  --- CMFDefault/DublinCore.py    30 Jan 2004 22:22:53 -0000
>  ***************
>  *** 253,259 ****
>                date = getattr( self, 'creation_date', None )
>            return date is None and self.__FLOOR_DATE or date
>  
>  !     __CEILING_DATE = DateTime( 9999, 0 ) # never expires
>  
>        security.declarePublic( 'expires' )
>        def expires( self ):
>  --- 253,259 ----
>                date = getattr( self, 'creation_date', None )
>            return date is None and self.__FLOOR_DATE or date
>  
>  !     __CEILING_DATE = DateTime( 2037, 0 ) # never expires
>  
>        security.declarePublic( 'expires' )
>        def expires( self ):
>  ---------------- 8< -----------------------------------
>  
>  The better fix would involve not returning the silly _CEILING_DATE at 
>  all, and then telling the index whether to treat 'None' as low or high.
>  
>  Tres.


_______________________________________________
Zope-Dev maillist  -  Zope-Dev@[...].org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )
Thread:
Tres Seaver
Jason Spisak
Jason Spisak
Tres Seaver
Jason Spisak
Tres Seaver
Jason Spisak

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved