[Zope] Debugging and Environment Variables

Dylan Reinhardt zope@dylanreinhardt.com
30 Mar 2003 16:02:46 -0800


On Sun, 2003-03-30 at 14:52, Derek Basch wrote:
> 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>

Running Zope this way isn't an area of great expertise for me... but it
seems pretty clear that you're asking for something that isn't there. Or
isn't where you're looking for it, anyway.

I say that because you're getting back a Zope-style error message. 
Throwing up a "not found" error message is correct behavior when Zope
can't find the object you request.

If this:

ZPublisher.Zope('')

returns the "Quick Start" page (or whatever root index you defined) then
you can surmise that the connection to Zope is working.  Any other
problems you encounter probably have something to do with your request.

> 
> 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?

The port is irrelevant, as you're not connecting through the web.  It's
responding *as though* it's running on 80, but there isn't actually any
port involved.

You might also find this howto helpful:
http://www.zope.org/Members/michel/HowTos/TheDebuggerIsYourFriend

HTH,

Dylan