[mod_python] and the silliest error of the year goes to...

Brian Kim bkimstunnaboss at gmail.com
Mon Jan 20 19:52:16 UTC 2014

Dear mp'ers,

After exploring my possible options for using Python (using 2.7.3) in web
development, my heart settled on mod_python, I took my 6 year old (32-bit)
netbook, and went through the installation portion of the documentation to
familiarize myself with this fascinating apache module.
So I started from scratch, meaning slapped on a fresh copy of Ubuntu
(12.04), built apache (2.4.7) from source,and then went on to the
mod_python (3.5) stuff. I think it's worth mentioning that I found that
"make"ing mod_python encountered an error related to a missing header file
which I resolved via StackOverflow to simply install the python-dev tools.
So I edited my httpd.conf file to include the module, added the test
handler directive, and wrote the test script; but when I pointed my browser
to the script, I got a "No data received" response. I tried running apache
in single-user mode as the troubleshooter suggested but all that happened
is that httpd would just return back to the shell if the python script was
It turns out that there was an error when python would try to import
mod_python. Specifically, it was an "EOL while scanning string literal" in
version.py. By changing the " literal to """, I got my "Hello World!" when
running the module.

I know that version.py is automatically generated by setup.py but this
seems like an error that could easily happen to other people...

Best Wishes,
Brian Kim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.modpython.org/pipermail/mod_python/attachments/20140120/7947c7a5/attachment.html>

More information about the mod_python mailing list