David Zaslavsky
diazona at gmail.com
Sat Feb 21 19:16:02 EST 2009
Why not give matplotlib an absolute path? You could get the document root from mod_python and os.path.join() it to the subdirectory you want to save to. Whenever I've written scripts that save figures with matplotlib, I always specify absolute paths and I've never had a problem. :) David On Sat, Feb 21, 2009 at 6:12 PM, Ron Phelps <rphelps at redshift.com> wrote: > I have successfully configured mod_python and using some python scripts > am accessing a database for the purpose of generating plots using > matplotlib. > > The problem is that when I try to save a plot to a subdir of the Apache > document root I get the following error. > > '/root' is not a writable dir; you must set the environment variable > HOME to be a writable dir > > echo $HOME returns '/root' but setting it to the correct path and even > changing the dir permissions does no good. > > Tried useing the MPLCONFIGDIR to point to a MATPLOTLIBRC file but no > luck there either. > > Does anyone know What HOME variable is this error message referring to? > > BTW Graham, I came across your article on "modwsgi" though it may not be > directly related I will read it in hopes it gives me some insight. > > All help appreciated. > > Thanks > > Ron > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|