[mod_python] Debugging mod_python errors - publisher.py

Guruprasad lgp171188 at gmail.com
Sat Apr 24 07:33:11 EDT 2010

Hi all,

I am using mod_python for developing web applications and here is one
strange error that is occuring that I couldn't debug.

Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
299, in HandlerDispatch
    result = object(req)

  File "/usr/lib/python2.4/site-packages/mod_python/publisher.py",
line 213, in handler
    published = publish_object(req, object)

  File "/usr/lib/python2.4/site-packages/mod_python/publisher.py",
line 412, in publish_object
    return publish_object(req,util.apply_fs_data(object, req.form, req=req))

  File "/usr/lib/python2.4/site-packages/mod_python/publisher.py",
line 453, in publish_object
    result = str(object)

  File "", line 215, in respond

TypeError: a float is required

This is my mod_python version detail:
Package: libapache2-mod-python
Status: install ok installed
Priority: optional
Section: python
Installed-Size: 540
Maintainer: Debian Python Modules Team
<python-modules-team at lists.alioth.debian.org>
Architecture: i386
Version: 3.3.1-7
Replaces: libapache2-mod-python2.3 (<< 3.2.8-3),
libapache2-mod-python2.4 (<< 3.2.8-3)
Provides: libapache2-mod-python2.5
Depends: debconf (>= 0.5) | debconf-2.0, python (<< 2.6), python (>=
2.5), python-central (>= 0.6.7), libc6 (>= 2.7-1), python2.5 (>= 2.5),
apache2.2-common, apache2
Suggests: libapache2-mod-python-doc
Conflicts: libapache-mod-python, libapache-mod-python2.1,
libapache-mod-python2.2, libapache-mod-python2.3,
libapache2-mod-python2.2, libapache2-mod-python2.3,
 /etc/apache2/mods-available/python.load 0ce662d08e252896b88072b3476013f4
Description: Python-embedding module for Apache 2
 The mod_python module supports web applications written in Python.
 Because the parser is embedded in the server as an Apache module, it
 will run much faster than traditional CGI.
 This package is built for the current Python version.
Homepage: http://www.modpython.org/
Python-Version: 2.5


I am using Cheetah templating and all I am doing is trying to pass
dictionaries of dictionaries to the template. Any insights into when
and why this error would occur will be really helpful.

Thanks in advance.


More information about the Mod_python mailing list