[Zope] assertion error

Denis Mishunoff spliter at sdtcom.lg.ua
Sat May 14 05:19:26 EDT 2005


Hello, Dieter.

You wrote 13 мая 2005 г., 22:21:49:

> Looks as if your catalog were very old and still has entries
> with request relative resolution.

> Replace "assert(obj)" with

>         if not obj:
>            # here the assert would fail
>            # determine its path for later analysis
>            path = brain.getPath()
>            # ensure, you can see "path" somehow
>         else:
>            # here the assert would pass
>            ...

> With this information, you can try to analyse the problem
> in an interactive Python interpreter.

Thanks, Dieter.
I tried your advice and made the following code:

         if not obj:
            # here the assert would fail
            # determine its path for later analysis
            path = brain.getPath()
            tagencies.append(path)
         else:
            # here the assert would pass
            ...

To have either object or brain's path in output ("tagencies" list).
The most interesting is that accessing via name I've got objects and
paths, but accessing via IP I've got ONLY object - no paths...

Then I checked the paths I got for presence of objects on them.
Objects are there, so I decided to use

tagencies.append(portal.restrictedTraverse(path))

in code (portal variable was defined), but got the "sign in" screen :(
Maybe it's because I have not so usual structure of Instance? I have
ZOPE-ROOT
- Folder1
  - Plone site

I'm totally confused and don't know what to do with all this. Please
advise.



-- 
  Best regards,
 Denis Mishunoff                          mailto:spliter at sdtcom.lg.ua
                                          http://plonetarium.objectis.net



More information about the Zope mailing list