Page 1 of 1

CLOSED:OMERO.web Drive Space Piechart not working

PostPosted: Thu Sep 02, 2010 11:50 am
by Lon
I installed OMERO.server (OMERO Beta 4.2.0) with the production OMERO.web ( mod_python26 )

OMERO.server seems to work good, but when I go in webadmin to Drive Space, I get the error:
Code: Select all
Piechart could not be displayed. Please check log file to solve the problem.


the OMEROweb.log tells me this:

Code: Select all
Thu, 02 Sep 2010 12:39:26 views-admin  ERROR    Traceback (most recent call last):
  File "/usr/local/omero/lib/python/omeroweb/webadmin/views.py", line 1011, in piechart
    from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
  File "/usr/lib64/python2.6/site-packages/matplotlib/__init__.py", line 739, in <module>
    rcParams = rc_params()
  File "/usr/lib64/python2.6/site-packages/matplotlib/__init__.py", line 657, in rc_params
    fname = matplotlib_fname()
  File "/usr/lib64/python2.6/site-packages/matplotlib/__init__.py", line 595, in matplotlib_fname
    fname = os.path.join(get_configdir(), 'matplotlibrc')
  File "/usr/lib64/python2.6/site-packages/matplotlib/__init__.py", line 248, in wrapper
    ret = func(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/matplotlib/__init__.py", line 471, in _get_configdir
    raise RuntimeError("Failed to create %s/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data"%h)
RuntimeError: Failed to create /root/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data


I run OMERO.server on RHEL 5.5.
In /etc/profile.d I have put a special config for the omero and apache users to set all python and omero required env variables.
Code: Select all
if [ $EUID -ne 0 ] ; then
export PATH=/opt/Ice-3.3.1/bin:/usr/local/omero/bin:$PATH
export PYTHONPATH=/opt/Ice-3.3.1/python:$PYTHONPATH:/usr/lib64/python2.6:/usr/lib64
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/lib64
alias python='python2.6'
fi
export MPLCONFIGDIR=/usr/local/omero/var/mpl


The root user may not have these settings as RHEL's yum will not work as they require python 2.4

for mod_python I use these settings:
Code: Select all
<Location "/">
       SetHandler python-program
       PythonOption MPLCONFIGDIR /usr/local/omero/var/.matplotlib
       PythonHandler django.core.handlers.modpython
       SetEnv DJANGO_SETTINGS_MODULE omeroweb.settings
       PythonDebug On
       PythonPath "['/opt/Ice-3.3/python', '/usr/lib64/python2.6','/usr/local/omero/lib/python', '/usr/local/omero/var/lib', '/usr/local/omero/lib/python/omeroweb'] + sys.path"
</Location>


How can I solve the Piechart issue?

Re: OMERO.web Drive Space Piechart not working

PostPosted: Sun Sep 05, 2010 7:12 pm
by atarkowska
Hi,

Code: Select all
  File "/usr/lib64/python2.6/site-packages/matplotlib/__init__.py", line 471, in _get_configdir
    raise RuntimeError("Failed to create %s/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data"%h)
RuntimeError: Failed to create /root/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data


It's trying to write to MPLCONFIGDIR. Is that directory writable, by the apache_user that is running?