<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Chris,<div><br></div><div>You can just go into your site-packages (likely where python setup.py installed the egg) and remove the whole egg which is just a folder of the scripts that is automatically on your PYTHONPATH.</div><div><br></div><div>This one: 'TileCache-2.04-py2.5.egg'</div><div><br></div><div>Then to get the imports working, download a fresh copy of tilecache to an easy to work with location, and simply put the folder that contains the 'TileCache' folder on your PYTHONPATH by setting that variable in your System Settings.</div><div><br></div><div>The you should be able to do:</div><div>>>> import TileCache</div><div><br></div><div>and then with mod_python use the directive:</div><div><br></div><div><span class="Apple-style-span" style="font-family: -webkit-monospace; font-size: 11px; ">PythonPath "['/path/to/folder/containing_tilecache/'] + sys.path"</span></div><div><br></div><div>Dane</div><div><br></div><div><br></div><div><br></div><div><br><div><div>On Nov 24, 2008, at 9:51 PM, chris marx wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Also,<br>&nbsp;I'd like to make these changes, but when i redeployed tilecache on apache with mod_python, it couldn't find the imports until i ran the setup.py. now it looks like the scripts are getting exectured from the egg (anyone have any links to explain what the heck this is...). To recreate this with changes in the code, do i just delete the egg, or do i also need to the delete the .pyc files it also generated?<br> <br><div class="gmail_quote">On Mon, Nov 24, 2008 at 11:33 PM, chris marx <span dir="ltr">&lt;<a href="mailto:chrismarx@gmail.com">chrismarx@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Well, that might be the case, but when I hook a site up to the wms directly, I don't get any errors from the wms. So.. I'd like to see what error tilecache is getting back from my wms server. Should i just put in a logging statement of the response from line 54 in Client.py?<div> <div></div><div class="Wj3C7c"><br> <br><br><div class="gmail_quote">On Mon, Nov 24, 2008 at 10:55 PM, Christopher Schmidt <span dir="ltr">&lt;<a href="mailto:crschmidt@metacarta.com" target="_blank">crschmidt@metacarta.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div>On Mon, Nov 24, 2008 at 10:26:31PM -0500, chris marx wrote:<br> > here;s the full error<br> ><br> > An error occurred: HTTP Error 500: Internal Server Error<br> <br> </div>That's not a timeout. That's your remote WMS server returning an honest<br> to goodness error. There's nothing TileCache can do about that.<br> <br> -- Chris<br> <div><div></div><div><br> > &nbsp; File "c:\python25\lib\site-packages\TileCache-2.04-py2.5.egg\TileCache\Service.py",<br> > line 224, in modPythonHandler<br> > &nbsp; &nbsp; host )<br> > &nbsp; File "c:\python25\lib\site-packages\TileCache-2.04-py2.5.egg\TileCache\Service.py",<br> > line 208, in dispatchRequest<br> > &nbsp; &nbsp; return self.renderTile(tile, params.has_key('FORCE'))<br> > &nbsp; File "c:\python25\lib\site-packages\TileCache-2.04-py2.5.egg\TileCache\Service.py",<br> > line 138, in renderTile<br> > &nbsp; &nbsp; data = layer.render(tile)<br> > &nbsp; File "c:\python25\lib\site-packages\TileCache-2.04-py2.5.egg\TileCache\Layer.py",<br> > line 437, in render<br> > &nbsp; &nbsp; return self.renderTile(tile)<br> > &nbsp; File "c:\python25\lib\site-packages\TileCache-2.04-py2.5.egg\TileCache\Layers\WMS.py",<br> > line 29, in renderTile<br> > &nbsp; &nbsp; tile.data, response = wms.fetch()<br> > &nbsp; File "c:\python25\lib\site-packages\TileCache-2.04-py2.5.egg\TileCache\Client.py",<br> > line 54, in fetch<br> > &nbsp; &nbsp; response = self.client.open(urlrequest)<br> > &nbsp; File "C:\Python25\Lib\urllib2.py", line 387, in open<br> > &nbsp; &nbsp; response = meth(req, response)<br> > &nbsp; File "C:\Python25\Lib\urllib2.py", line 498, in http_response<br> > &nbsp; &nbsp; 'http', request, response, code, msg, hdrs)<br> > &nbsp; File "C:\Python25\Lib\urllib2.py", line 425, in error<br> > &nbsp; &nbsp; return self._call_chain(*args)<br> > &nbsp; File "C:\Python25\Lib\urllib2.py", line 360, in _call_chain<br> > &nbsp; &nbsp; result = func(*args)<br> > &nbsp; File "C:\Python25\Lib\urllib2.py", line 506, in http_error_default<br> > &nbsp; &nbsp; raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)<br> ><br> ><br> ><br> > On Mon, Nov 24, 2008 at 5:56 PM, chris marx &lt;<a href="mailto:chrismarx@gmail.com" target="_blank">chrismarx@gmail.com</a>> wrote:<br> ><br> > > anybody?<br> > ><br> > ><br> > > On Sun, Nov 23, 2008 at 3:45 PM, chris marx &lt;<a href="mailto:chrismarx@gmail.com" target="_blank">chrismarx@gmail.com</a>> wrote:<br> > ><br> > >> Hi,<br> > >> &nbsp;When no one has made a WMS request to my WMS service (Manifold GIS) it<br> > >> takes a little longer to respond on that first request because its creating<br> > >> an instance of its mapserver object. In any case, tilecache ends up<br> > >> returning a urllib error because I'm assuming the request timed out --<br> > >> specifically, because hitting the same url again results in a successful<br> > >> request and a tile comes back. Is there a way to increase the timeout limit?<br> > >> --running apache and mod_python-<br> > >> chris-<br> > >><br> > >> --<br> > >><br> > >> Chris Marx<br> > >> Programmer/Analyst<br> > >> Cornell Lab of Ornithology<br> > >> 159 Sapsucker Woods Rd.<br> > >> Ithaca, NY 14850<br> > >> t. 1.607.254.1142<br> > >> <a href="http://www.birds.cornell.edu/" target="_blank">http://www.birds.cornell.edu/</a><br> > >><br> > ><br> > ><br> > ><br> > > --<br> > ><br> > > Chris Marx<br> > > Programmer/Analyst<br> > > Cornell Lab of Ornithology<br> > > 159 Sapsucker Woods Rd.<br> > > Ithaca, NY 14850<br> > > t. 1.607.254.1142<br> > > <a href="http://www.birds.cornell.edu/" target="_blank">http://www.birds.cornell.edu/</a><br> > ><br> ><br> ><br> ><br> > --<br> ><br> > Chris Marx<br> > Programmer/Analyst<br> > Cornell Lab of Ornithology<br> > 159 Sapsucker Woods Rd.<br> > Ithaca, NY 14850<br> > t. 1.607.254.1142<br> > <a href="http://www.birds.cornell.edu/" target="_blank">http://www.birds.cornell.edu/</a><br> <br> </div></div>> _______________________________________________<br> > Tilecache mailing list<br> > <a href="mailto:Tilecache@openlayers.org" target="_blank">Tilecache@openlayers.org</a><br> > <a href="http://openlayers.org/mailman/listinfo/tilecache" target="_blank">http://openlayers.org/mailman/listinfo/tilecache</a><br> <font color="#888888"><br> <br> --<br> Christopher Schmidt<br> MetaCarta<br> </font></blockquote></div><br><br clear="all"><br></div></div>-- <br><div><div></div><div class="Wj3C7c"><br>Chris Marx<br>Programmer/Analyst<br>Cornell Lab of Ornithology<br>159 Sapsucker Woods Rd.<br>Ithaca, NY 14850<br> t. 1.607.254.1142<br><a href="http://www.birds.cornell.edu/" target="_blank">http://www.birds.cornell.edu/</a><br> </div></div></blockquote></div><br><br clear="all"><br>-- <br><br>Chris Marx<br>Programmer/Analyst<br>Cornell Lab of Ornithology<br>159 Sapsucker Woods Rd.<br>Ithaca, NY 14850<br>t. 1.607.254.1142<br><a href="http://www.birds.cornell.edu/">http://www.birds.cornell.edu/</a><br> _______________________________________________<br>Tilecache mailing list<br><a href="mailto:Tilecache@openlayers.org">Tilecache@openlayers.org</a><br>http://openlayers.org/mailman/listinfo/tilecache<br></blockquote></div><br></div></body></html>