[Zope3-dev] KeyError when accessing ZopeTop

Marius Gedminas mgedmin@codeworks.lt
Mon, 7 Apr 2003 10:46:46 +0300


On Sat, Apr 05, 2003 at 07:48:06PM -0600, Garrett Smith wrote:
> Here's what's causing the problem on my systems:
> 
>   .../skins/zopetop/www/widget_macros.pt
>   --------------------------------------------------------
>   ---> <?xml version="1.0" encoding="iso-8859-1"?>
> 
> When I remove this line, no more error. It's not the "encoding"
> attribute...I removed that and still problems. I'm surprised that no one
> is seeing this. I can recreate it on Windows and Linux.
> 
> I confirmed that the macros attribute of the page index was empty,
> suggesting that the page just isn't loading. I didn't see any errors or
> warnings using pt_errors/pt_warnings.

When you use TAL/METAL on an XML file, you have to explicitly declare
'tal' and 'metal' namespaces:

  <?xml version="1.0" encoding="iso-8859-1"?>
  <html xmlns:tal="http://xml.zope.org/namespaces/tal"
        xmlns:metal="http://xml.zope.org/namespaces/metal">
    ...

Marius Gedminas
-- 
Codeworks is available for Zope consulting -- http://www.codeworks.lt/