[Grok-dev] Re: Zope 3 error message rage... :)

Luciano Ramalho luciano at ramalho.org
Sat Jul 7 17:12:00 EDT 2007

On 7/7/07, Martijn Faassen <faassen at startifact.com> wrote:
> Just glancing at the traceback makes me think we may be able to make
> this one go away. I invite people to edit the method __getitem__ on
> line 137 of components.py in Grok and catch this error. Instead, raise
> some nicer error message (could still be a TypeError or a ValueError
> or something, I'm not sure what triggers this failure).

I think the trigger is a macro template with compilation errors, which
is reported in the log, but much earlier than when we actually look at
the page.

In Sebastian's case, the error was in the URL xmlns declaration. In my
case, I wrote this:

    <!-- Additional headers here... -->

when I should have this:

  <metal:hdr define-slot="headers">
    <!-- Additional headers here... -->

I made that mistake because I was copying and editing code from Uli's
tutorial and in the last code example he wrote:

              <!-- Additional headers here... -->

Which is a syntax error. It should be something like this:

  <metal:hdr fill-slot="headers">
    <!-- Additional headers here... -->

I will go ahead and fix this in Uli's sandbox, OK?

> Volunteers? You need to also add a test case for this that triggers
> this error and sees whether we get the expected error message.

I will try to implement the fix you requested. If I get stuck I will
let you know.



More information about the Grok-dev mailing list