[Zope3-dev] KeyError when accessing ZopeTop

Garrett Smith garrett@mojave-corp.com
Mon, 7 Apr 2003 10:43:25 -0500


Whatever the rule or fix ends up being, there should be a meaningful
error that's raised and that makes it to the log. E.g.

   "undelcared XML namespace 'tal' in foo.pt at line n"

would have saved quite a bit of poking around.

Is an error getting burried some place along the way? Or is it just not
being raised in the first place?

Garrett Smith
Mojave Corporation


> -----Original Message-----
> From: Marius Gedminas [mailto:mgedmin@codeworks.lt]
> Sent: Monday, April 07, 2003 2:55 AM
> To: zope3-dev (E-mail)
> Subject: Re: [Zope3-dev] KeyError when accessing ZopeTop
>=20
>=20
> On Mon, Apr 07, 2003 at 10:46:46AM +0300, Marius Gedminas wrote:
> > On Sat, Apr 05, 2003 at 07:48:06PM -0600, Garrett Smith wrote:
> > > Here's what's causing the problem on my systems:
> > >=20
> > >   .../skins/zopetop/www/widget_macros.pt
> > >   --------------------------------------------------------
> > >   ---> <?xml version=3D"1.0" encoding=3D"iso-8859-1"?>
> > >=20
> > > When I remove this line, no more error. It's not the "encoding"
> > > attribute...I removed that and still problems. I'm=20
> surprised that no one
> > > is seeing this. I can recreate it on Windows and Linux.
> > >=20
> > > I confirmed that the macros attribute of the page index was empty,
> > > suggesting that the page just isn't loading. I didn't see=20
> any errors or
> > > warnings using pt_errors/pt_warnings.
> >=20
> > When you use TAL/METAL on an XML file, you have to=20
> explicitly declare
> > 'tal' and 'metal' namespaces:
> >=20
> >   <?xml version=3D"1.0" encoding=3D"iso-8859-1"?>
> >   <html xmlns:tal=3D"http://xml.zope.org/namespaces/tal"
> >         xmlns:metal=3D"http://xml.zope.org/namespaces/metal">
> >     ...
>=20
> Unfortunatelly after adding those to=20
> zopetop/www/widget_macros.pt I get a
> different error:
>=20
>   METALError: macro 'views/standard_macros/logged_user' has=20
> incompatible
>   mode 'xml', at line 37, column 3
>=20
> Does this mean you cannot mix HTML and XML templates?
>=20
> Removing the <?xml?> declaration from widget_macros.pt seems=20
> to fix the
> ZopeTop skin.
>=20
> Marius Gedminas
> --=20
> Codeworks is available for Zope consulting -- http://www.codeworks.lt/
>=20
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-dev
>=20