Python Forum

Full Version: Mod_Python Issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have Apache running on a RedHat server, set up with mod_python using mod_python.publisher.
I have no problem navigating to any of the Python scripts in the main directory of the website -- the script executes and the output is returned to the browser as expected.  However, when I try tonavigate to a Python script in a sub-directory, I get this error message:
Error:
Mod_python error: "PythonHandler mod_python.publisher" Traceback (most recent call last): File "/usr/lib64/python2.6/site-packages/mod_python/apache.py", line 398, in HandlerDispatch   result = obj(req) File "/usr/lib64/python2.6/site-packages/mod_python/publisher.py", line 213, in handler   module = page_cache[req] File "/usr/lib64/python2.6/site-packages/mod_python/cache.py", line 89, in __getitem__   return self._checkitem(name)[2] File "/usr/lib64/python2.6/site-packages/mod_python/cache.py", line 131, in _checkitem   value = self.build(key, name, opened, entry) File "/usr/lib64/python2.6/site-packages/mod_python/publisher.py", line 86, in build   return ModuleCache.build(self, key, req, opened, entry) File "/usr/lib64/python2.6/site-packages/mod_python/cache.py", line 380, in build   exec(opened_as_str, module.__dict__) File "", line 2  ^ SyntaxError: invalid syntax
Any help would be greatly appreciated.
I am using mod_python because I am setting up a staging server for an application that is running on a production server that uses mod_python.  That the production server is using mod_python is beyond my control.
There's not really enough information here. Can you provide very brief instructions for how to reproduce the problem with scripts <20 lines each? (And probably 3 or fewer scripts.)