[reportlab-users] Generic mod_python error when returning pdf

Bill Freeman bfreeman at appropriatesolutions.com
Tue Oct 13 10:09:43 EDT 2009



----- Original Message -----
From: "Simone Dalmasso" <simone.dalmasso at gmail.com>
To: "For users of Reportlab open source software" <reportlab-users at lists2.reportlab.com>
Sent: Tuesday, October 13, 2009 8:44:54 AM GMT -05:00 US/Canada Eastern
Subject: Re: [reportlab-users] Generic mod_python error when returning pdf

...
File "/usr/lib64/python2.4/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)

File "/usr/lib64/python2.4/site-packages/mod_python/importer.py", line 1229, in _process_target
result = _execute_target(config, req, object, arg)

File "/usr/lib64/python2.4/site-packages/mod_python/importer.py", line 1128, in _execute_target
result = object(arg)

File "/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 228, in handler
return ModPythonHandler()(req)

File "/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 201, in __call__
response = self.get_response(request)

File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 128, in get_response
return self.handle_uncaught_exception(request, resolver, exc_info)

File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 160, in handle_uncaught_exception
return callback(request, **param_dict)

File "/usr/lib/python2.4/site-packages/django/views/defaults.py", line 23, in server_error
t = loader.get_template(template_name) # You need to create a 500.html template.

File "/usr/lib/python2.4/site-packages/django/template/loader.py", line 80, in get_template
source, origin = find_template_source(template_name)

File "/usr/lib/python2.4/site-packages/django/template/loader.py", line 73, in find_template_source
raise TemplateDoesNotExist, name

TemplateDoesNotExist: 500.html

...

Part of this is trying to render the the template error, so the original error is obscured.

Since stuff at the deep end of the stack is involved with importer, one thing to check is whether
the python path is enough different between command line (as for run server) and under mod_python
to keep you from finding, perhaps, the report lab installation.

Also, mod_python is running as apache or root (whatever apache runs as), and some part of your
code might have been installed without read permission for the apache user (check directory
permissions too).

Also, this should probably be asked on the django users list (a google group), where someone may
just recognize the trace.

Bill


More information about the reportlab-users mailing list