[Zope-dev] getpath not working

Michel Pelletier michel@digicool.com
Fri, 23 Jul 1999 12:00:59 -0400


Jason Spisak wrote:
> 
> > <!--#var "Catalog.getpath(1)"-->
> >
> > all by itself, not in the Catalog folder, works dandy.  Can you do this?
> >
> No.  I get a keyerror in the management interface and another error when
> I call it by url.
> 
> Traceback (innermost last):

<snip>

>   File /home/mike_weltz/Zope/lib/python/Products/ZCatalog/ZCatalog.py,
> line 352, in getpath
>     (Object: Catalog)
> KeyError: (see above)
> 

The last line of this traceback shows that getpath is being called,
there just isn't a record object in your catalog with the record id of
1.  Getpath is very simple, it just returns the catalog unique id for a
certain integer, in this case, there is no unique id that coresponds to
the record id 1.

> -->
> 
> for the management interface, and this when I call it like
> 'http://myserver:9673/subfolder/test' where test is just
> <!--#var "Catalog.getpath(1)"---> only when not logged in as the
> "Manager' Role.  *All* permissions for the non-manager user are allowed.
>  And it doesn't raise a not authorized error, so that is wierd.
> 
>  <STRONG>Error Type: AttributeError</STRONG><BR>
>   <STRONG>Error Value: getpath</STRONG><BR>
> 
> <!--
> Traceback (innermost last):

<snip>

>   File /home/mike_weltz/Zope/lib/python/DocumentTemplate/DT_Util.py,
> line 126, in careful_getattr
> AttributeError: (see above)
> 

This is odd.  What does <!--#var "Catalog"--> say in the same document?

-Michel