I have it working standalone, so I wanted to throw it behind Apache.
Since mod_python is deprecated (and I couldn't get it to work), I
thought I'd go the WGI route.
I wrote a little script:
#!/usr/bin/env python
import TileStache
application = TileStache.WSGITileServer('/etc/tilestache.cfg')
and direct my web server to it via apache.
I don't know if I'm using this the right way, but the WSGITileServer
does have the call method and appears to return the result in an
iterable as per the wsgi docs, so I'm assuming this is correct.
If I go to the plain URL, with no arguments, I get the proper:
"Bad path: "/". I was expecting something more like "/example/0/0/0.png" error.
If I give it a phony layer, I get a 404, but no body.
And if I give it what should be a valid path, I get the 500 error from Apache.
The logs show:
TypeError: expected byte string object for header value, value of type
NoneType found
on the last one, but no error at all on the phony layer.
The first two are expected behaviors, but that last behavior is not.
It appears to be (using the parlance of the code and Mr. Rumsfield) an
UnknownUnknown.
I don't know how to debug this kind of error in the Apache
environment. Standalone it all works.
How can I debug this or can someone recommend a better way?
- Serge