Re: Matplotlib error from a mod_python script "root is not a writable dir... "

David Zaslavsky <[email protected]>
Newsgroups gmane.comp.python.mod_python
Message-ID <[email protected]>
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-phKd+DpA3E5Wk0Htik3J/[email protected]> 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
> [email protected]
> http://mailman.modpython.org/mailman/listinfo/mod_python
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.