[Zope] Debugging and Environment Variables
Derek Basch
dbasch@yahoo.com
Sun, 30 Mar 2003 14:52:16 -0800 (PST)
Dylan,
Thanks for the reply. I see now that I was
misunderstanding how to include paths while simulating
a call to an object. So, I tried what you suggested:
ZPublisher.Zope('/test/index_html')
and here is the traceback:
<P><STRONG>Resource not found</STRONG></P>
Sorry, the requested resource does not exist.<p>Check
the URL and try again.</p><p><b>Resource:</b>
http://127.0.0.1/Zope/test</p>
It seems that it is still performing all traversals
with (http://127.0.0.1/Zope) as the root with no port
defined. Is this because of how the request is
simulated? Suggestions?
Thanks again,
Derek Basch
--- Dylan Reinhardt <zope@dylanreinhardt.com> wrote:
> On Sun, 2003-03-30 at 10:48, Derek Basch wrote:
> > >>>
> > >>> ZPublisher.Zope('http://localhost:8080/')
> > Status: 404 Not Found
> > .....
> > <P><STRONG>Resource not found</STRONG></P> Sorry,
> the
> > requested resource does not exist.<p>Check the URL
> and
> > try again.</p><p><b>Resource:</b>
> > http://127.0.0.1/Zope/h
> > ttp%3A</p>
>
> The error message says it can't find "http:". Since
> that's the first 5
> letters of what you typed in, I'd suspect this might
> be your problem.
>
> And indeed it is.
>
> You're already connected to a running Zope instance,
> so there's no need
> to specify the protocol or hostname. Not only is
> there no need, it's
> wrong. You just need to specify what object you
> want to access,
> relative to the root of the process you're connected
> to.
>
> Try this:
>
> ZPublisher.Zope('/path/to/object')
>
> HTH,
>
> Dylan
>
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com