[Zope] Uninteligible error messages

Chris Withers chris at simplistix.co.uk
Fri Feb 18 07:03:32 EST 2005


jamie at textmatters.com wrote:

> Quite often, the error messages from zope are not helpful (IMHO). For
> example, does anyone know why doing this in a python script:
> 
>   script.manage_addProperty("test","null/null/null","date")
> 
> gives the error:
> AttributeError: SyntaxError instance has no attribute 'replace'

Yeah, that is odd, stick it in the collector...

> But a differently-bad date, like this:
> 
>   script.manage_addProperty("test","null","date")
> 
> gives the error:
> IndexError: string index out of range

Indeed.

> Neither of which is particularly helpful at diagnosing the error. Why
> can't it return something like "DateException could not convert string to
> date"

Sometimes it does, but date parsing is pretty hairy in anyone's language ;-)

> Does this count as a bug that should go in collector?

Probably...

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope mailing list