Set MPLCONFIGDIR to something different

Hi,

Im getting the error:

<type 'exceptions.RuntimeError'>: Failed to create
/$dirstring$/common/.matplotlib; consider setting MPLCONFIGDIR to a writable
directory for matplotlib configuration data

The problem is I do not have write access to the MatPlotLib module sourse,
so I cannot change the MPLCONFIGDIR variable, where ever it is..!

So my question is can I set MPLCONFIGDIR to say "/home/user/dirs/" in my
script somewhere, so that I know the that directory has read/write access.

Thank you for your time.

Regards

···

--
View this message in context: http://www.nabble.com/Set-MPLCONFIGDIR-to-something-different-tp19033822p19033822.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

stuartornum wrote:

Hi,

Im getting the error:

<type 'exceptions.RuntimeError'>: Failed to create
/dirstring/common/.matplotlib; consider setting MPLCONFIGDIR to a writable
directory for matplotlib configuration data

The problem is I do not have write access to the MatPlotLib module sourse,
so I cannot change the MPLCONFIGDIR variable, where ever it is..!

So my question is can I set MPLCONFIGDIR to say "/home/user/dirs/" in my
script somewhere, so that I know the that directory has read/write access.

Thank you for your time.

Regards
  

Stuart: Why are you setting the MPLCONFIGDIR environment variable? By default, the configuration file goes in $HOME/.matplotlib, which is usually just fine. Typically $MPLCONFIGDIR is used to override this in special situations, for example when running matplotlib in a web application.

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

Hi Jeff,

Sorry I should have explained more. I am running a web app also I currently
working for a very large organisation so the infrastructure is quite
different to your average home / signle server setup.

Thank you.

···

--
View this message in context: http://www.nabble.com/Set-MPLCONFIGDIR-to-something-different-tp19033822p19034026.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

stuartornum wrote:

Hi Jeff,

Sorry I should have explained more. I am running a web app also I currently
working for a very large organisation so the infrastructure is quite
different to your average home / signle server setup.

Thank you.
  

Stuart: I don't think setting it in your script will have any effect. If MPLCONFIGDIR is unset, it should still work, since mpl will look in the web server's home directory. If you want to set MPLCONFIGDIR, it has to be done in the web server environment to have any effect.

However, I'm certainly no expert on running mpl in web apps. Have you tried searching the list archives for "MPLCONFIGDIR", or "web app"?

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

i think before importing matplotlib, you can do:
os.environ['HOME'] = "/some/path"

···

On Mon, Aug 18, 2008 at 8:25 AM, stuartornum <stuart@...2110...> wrote:

Hi Jeff,

Sorry I should have explained more. I am running a web app also I currently
working for a very large organisation so the infrastructure is quite
different to your average home / signle server setup.

Thank you.
--
View this message in context: http://www.nabble.com/Set-MPLCONFIGDIR-to-something-different-tp19033822p19034026.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options