[mod_python] Breaking things after upgrading MySQLdb (to 1.2.2)

Dirk van Oosterbosch, IR labs labs at ixopusada.com
Thu Jun 7 20:22:00 EDT 2007

Thanks a bunch!

Making a egg_cache_module.py file containing:
import os
os.environ['PYTHON_EGG_CACHE'] = '/var/tmp'

and just adding
PythonImport /full/path/to/some/egg_cache_module.py mynetworkname.lan
to httpd.conf. And restarting fixed the MySQLdb problem.
(and after I rebuild & reinstalled all my other python modules, since  
I'm now with python 2.5.1, my original web-app works again!)

once again you solved some mysterious problem, ;-)
Thanks Graham!


On 7-jun-2007, at 13:27, Graham Dumpleton wrote:

>> After I restarted my machine, it first gave:
>> [Thu Jun 07 10:05:54 2007] [error] [client ::1] ExtractionError:  
>> Can't
>> extract file(s) to egg cache\n\nThe following error occurred while  
>> trying to
>> extract file(s) to the Python egg\ncache:\n\n  [Errno 13]  
>> Permission denied:
>> '/var/empty/.python-eggs'\n\nThe Python egg cache directory
>> is currently set to:\n\n
>> /var/empty/.python-eggs\n\nPerhaps your account does not
>> have write access to this directory?  You can\nchange the cache  
>> directory by
>> setting the PYTHON_EGG_CACHE environment\nvariable to point to an  
>> accessible
>> directory.\n
> To get rid of this problem, create a new Python code module somewhere
> containing:
>  import os
>  os.environ['PYTHON_EGG_CACHE'] = '/some/path'
> The directory /some/path must be writable to the user that Apache  
> runs as.
> Then add to Apache global configuration:
>  PythonImport interpreter_name module_name
> Where interpreter_name is the name of the interpreter your mod_python
> application is running in, found by query req.interpreter in a request
> handler. And module_name is the name of the module you created above.
> If that module not in standard place, if using mod_python 3.3, use
> absolute path to code file instead.

Dirk van Oosterbosch
de Wittenstraat 225
1052 AT Amsterdam
the Netherlands


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20070608/a358bdec/attachment.html

More information about the Mod_python mailing list