[mod_python] mod_python + MySQLdb + Apache strange behavoir

Graham Dumpleton grahamd at dscpl.com.au
Thu Sep 15 07:50:03 EDT 2005

On 15/09/2005, at 3:06 PM, Earle Ady wrote:

> Graham,
> I managed to self-diagnose and repair this problem.  However, I turned 
> up another one, although unrelated.
> As for the MySQLdb inconsistencies, varying error messages, etc.  The 
> problem was actually quite simple!  I was using 
> MySQLdb.cursors.DictCursor as a cursor type and only importing 
> MySQLdb.
> I added a simple import for MySQLdb.cursors, and all of my problems 
> went away.   This is something I never would have guessed from the 
> behavioir and errors of mod_python and MySQLdb linkage, but a lot of 
> persistence and a truckload of tenacity managed to dig it up.
> It's bizarre that it would work at all, given the fix.   If anyone 
> else is having these problems, double check to see what type of cursor 
> they are using in MySQLdb, and if they are doing the import 
> specifically.  It should have been more clear as using the standard 
> cursor never had a problem but I obviously overlooked this for awhile.
> On a side note, my exact same setup on a Linux machine, when moved to 
> an OSX machine (same versions of everything...), craps out when trying 
> to use Sessions when acquiring a mutex lock.  Is this a known problem?

Define "crap out". Does it hang? Does it give an error and if so what?

In 3.1.4 there are some session issues which are addressed in 3.2, but
I don't know of any session specific problems that only occur on Mac OS 

Anyway, same deal as before, unless you can give specific details such
as the error messages and symptoms, it is really hard to give any sort
of specific advice.


More information about the Mod_python mailing list