Hello All, I've been using zope and matplotlib for some time now, and I want to connect them. I'am using the example code from page: http://www.scipy.org/Cookbook/Matplotlib/Matplotlib_and_Zope , but whenever I try to import matplotlib, and/or pylab packages i get this error from zope: Error Type: RuntimeError Error Value: '/' is not a writable dir; you must set environment variable HOME to be a writable dir Have You got any ideas, on what might go wrong? I'am using matplotlib 0.87.4, and zope 2.9.5 with python 2.4.3 on gentoo linux box. Thanks in advance for any help. Marek Szczypinski
--On 14. November 2006 12:16:40 +0100 Marek Szczypiński <Marek.Szczypinski@astri.uni.torun.pl> wrote:
Hello All,
I've been using zope and matplotlib for some time now, and I want to connect them. I'am using the example code from page: http://www.scipy.org/Cookbook/Matplotlib/Matplotlib_and_Zope , but whenever I try to import matplotlib, and/or pylab packages i get this error from zope:
Error Type: RuntimeError Error Value: '/' is not a writable dir; you must set environment variable HOME to be a writable dir
This is unlikely a Zope core issue. You must provide the *full traceback* in order to get help. Otherwise contact the authors of the related packages/products. And as the error message indicates your environment variable $HOME is not set properly or unset. -aj
Marek Szczypiński schrieb:
Hello All,
I've been using zope and matplotlib for some time now, and I want to connect them. I'am using the example code from page: http://www.scipy.org/Cookbook/Matplotlib/Matplotlib_and_Zope , but whenever I try to import matplotlib, and/or pylab packages i get this error from zope:
Error Type: RuntimeError Error Value: '/' is not a writable dir; you must set environment variable HOME to be a writable dir
*wild guess* you are starting Zope as root (via init) so $HOME points to root's home directory (usually /root) Now zope switches to another user (configured or default to nouser and thus cannot write to root's home anymore. You can either set another value for $HOME in your zope.cfg - there is a section for custom environment vars or modify mathplotlib to _not_ write to $HOME. (Sounds like a bad idea anyway - whats wrong with temp?) Zope Products use ZOPEHOME and INSTANCE_HOME Regards Tino
Here is the traceback. Looks like problem with matplotlib it self, doesn't it? Did anyone have the same problems? Thanks for any help. Marek Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Products.ExternalMethod.ExternalMethod, line 59, in manage_addExternalMethod Module Products.ExternalMethod.ExternalMethod, line 111, in __init__ Module Products.ExternalMethod.ExternalMethod, line 134, in manage_edit Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction Module App.Extensions, line 148, in getObject - __traceback_info__: ('/var/lib/zope/zope-markacy/Extensions/mpl.py', 'mpl') Module /var/lib/zope/zope-markacy/Extensions/mpl.py, line 1, in ? Module None, line 1011, in ? Module None, line 968, in rc_params Module None, line 914, in matplotlib_fname Module None, line 273, in wrapper Module None, line 324, in _get_configdir RuntimeError: '/' is not a writable dir; you must set environment variable HOME to be a writable dir Marek Szczypiński wrote:
Hello All,
I've been using zope and matplotlib for some time now, and I want to connect them. I'am using the example code from page: http://www.scipy.org/Cookbook/Matplotlib/Matplotlib_and_Zope , but whenever I try to import matplotlib, and/or pylab packages i get this error from zope:
Error Type: RuntimeError Error Value: '/' is not a writable dir; you must set environment variable HOME to be a writable dir
Have You got any ideas, on what might go wrong? I'am using matplotlib 0.87.4, and zope 2.9.5 with python 2.4.3 on gentoo linux box.
Thanks in advance for any help.
Marek Szczypinski
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Marek Szczypiński wrote:
Here is the traceback. Looks like problem with matplotlib it self, doesn't it? Did anyone have the same problems? Thanks for any help.
Marek
Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Products.ExternalMethod.ExternalMethod, line 59, in manage_addExternalMethod Module Products.ExternalMethod.ExternalMethod, line 111, in __init__ Module Products.ExternalMethod.ExternalMethod, line 134, in manage_edit Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction Module App.Extensions, line 148, in getObject - __traceback_info__: ('/var/lib/zope/zope-markacy/Extensions/mpl.py', 'mpl') Module /var/lib/zope/zope-markacy/Extensions/mpl.py, line 1, in ? Module None, line 1011, in ? Module None, line 968, in rc_params Module None, line 914, in matplotlib_fname Module None, line 273, in wrapper Module None, line 324, in _get_configdir RuntimeError: '/' is not a writable dir; you must set environment variable HOME to be a writable dir
Hi Marek, Never heard of matplotlib. But your traceback is saying that the product is trying to write to root - without sufficient permission. I'd look at the source (see _get_configdir) and see if its reading some sort of config file or maybe its parsing the enviromental var HOME.. You probably can modify that. Anyway, writing to "/" doesnt seem to be a good idea in any case. You have set variable "HOME"? Best, David H
David H wrote:
Marek Szczypiński wrote:
Here is the traceback. Looks like problem with matplotlib it self, doesn't it? Did anyone have the same problems? Thanks for any help.
Marek
Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Products.ExternalMethod.ExternalMethod, line 59, in manage_addExternalMethod Module Products.ExternalMethod.ExternalMethod, line 111, in __init__ Module Products.ExternalMethod.ExternalMethod, line 134, in manage_edit Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction Module App.Extensions, line 148, in getObject - __traceback_info__: ('/var/lib/zope/zope-markacy/Extensions/mpl.py', 'mpl') Module /var/lib/zope/zope-markacy/Extensions/mpl.py, line 1, in ? Module None, line 1011, in ? Module None, line 968, in rc_params Module None, line 914, in matplotlib_fname Module None, line 273, in wrapper Module None, line 324, in _get_configdir RuntimeError: '/' is not a writable dir; you must set environment variable HOME to be a writable dir
Hi Marek, Never heard of matplotlib. But your traceback is saying that the product is trying to write to root - without sufficient permission. I'd look at the source (see _get_configdir) and see if its reading some sort of config file or maybe its parsing the enviromental var HOME.. You probably can modify that. Anyway, writing to "/" doesnt seem to be a good idea in any case.
You have set variable "HOME"? Best, David H
Marek, I gave bad advise. Don't mess with (set) your HOME enviro var. David
participants (4)
-
Andreas Jung -
David H -
Marek Szczypiński -
Tino Wildenhain