CLOSED: piechart (disk space) - could not open display
Posted: Thu Sep 30, 2010 3:47 pm
Hi
when trying to see diskspace with Webadmin, I get the message "Piechart could not be displayed. Please check log file to solve the problem.". I looked into the log messages, searched in the forum and installation troubleshooting guide but my problem seems to be none of the previously reported.
Here's the error and traceback that I find in the log:
The "could not open display" may be related to the fact that there's no display, it's a remote virtual machine.
I'm running OMERO.server Beta 4.2.o on CentOS 5.5. Here's the output of diagnostic
EDIT: I looked into the matplotlib documentation and found this
I don't know python but I looked into ''lib/python/omeroweb/webadmin/views.py'' and found something that already said ''agg''.
when trying to see diskspace with Webadmin, I get the message "Piechart could not be displayed. Please check log file to solve the problem.". I looked into the log messages, searched in the forum and installation troubleshooting guide but my problem seems to be none of the previously reported.
Here's the error and traceback that I find in the log:
- Code: Select all
Thu, 30 Sep 2010 16:26:57 views-admin ERROR Traceback (most recent call last):
File "/home/omero/OMERO.server-Beta-4.2.0/lib/python/omeroweb/webadmin/views.py", line 1013, in piechart
import matplotlib.pyplot as plt
File "/usr/lib64/python2.4/site-packages/matplotlib/pyplot.py", line 78, in ?
new_figure_manager, draw_if_interactive, show = pylab_setup()
File "/usr/lib64/python2.4/site-packages/matplotlib/backends/__init__.py", line 25, in pylab_setup
globals(),locals(),[backend_name])
File "/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py", line 10, in ?
from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, FigureCanvasGTK,\
File "/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_gtk.py", line 8, in ?
import gtk; gdk = gtk.gdk
File "/usr/lib64/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 76, in ?
_init()
File "/usr/lib64/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 64, in _init
_gtk.init_check()
RuntimeError: could not open display
Thu, 30 Sep 2010 16:26:57 views-feedback ERROR handler500: Server error
Thu, 30 Sep 2010 16:26:57 views-feedback ERROR Traceback (most recent call last):
File "/home/omero/OMERO.server-Beta-4.2.0/lib/python/django/core/handlers/base.py", line 92, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/omero/OMERO.server-Beta-4.2.0/lib/python/omeroweb/webadmin/views.py", line 204, in wrapped
return f(request, *args, **kwargs)
File "/home/omero/OMERO.server-Beta-4.2.0/lib/python/omeroweb/webadmin/views.py", line 1017, in piechart
rv = "Error: %s" % x.message
AttributeError: RuntimeError instance has no attribute 'message'
The "could not open display" may be related to the fact that there's no display, it's a remote virtual machine.
I'm running OMERO.server Beta 4.2.o on CentOS 5.5. Here's the output of diagnostic
- Code: Select all
================================================================================
OMERO Diagnostics Beta-4.2.0-r7571-b29
================================================================================
Commands: java -version 1.6.0 (/usr/bin/java)
Commands: python -V 2.4.3 (/usr/bin/python)
Commands: icegridnode --version 3.3.1 (/usr/bin/icegridnode)
Commands: icegridadmin --version 3.3.1 (/usr/bin/icegridadmin)
Commands: psql --version 8.4.4 (/usr/bin/psql)
Server: icegridnode running
Server: Blitz-0 active (pid = 19174, enabled)
Server: DropBox inactive (disabled)
Server: FileServer active (pid = 19199, enabled)
Server: Indexer-0 active (pid = 19185, enabled)
Server: MonitorServer inactive (disabled)
Server: OMERO.Glacier2 active (pid = 19188, enabled)
Server: OMERO.IceStorm active (pid = 19192, enabled)
Server: Processor-0 active (pid = 19194, enabled)
Server: Repository-1 error: node `repo' couldn't be reached:
the node is not active
Server: Tables-0 inactive (disabled)
Server: TestDropBox inactive (enabled)
Log dir: /home/omero/OMERO.server-Beta-4.2.0/var/log exists
Log files: Blitz-0.log 3.0 MB errors=0 warnings=28
Log files: DropBox.log 0.0 KB errors=2 warnings=0
Log files: FileServer.log 0.0 KB
Log files: Indexer-0.log 154.0 KB errors=0 warnings=10
Log files: MonitorServer.log 0.0 KB errors=1 warnings=0
Log files: OMEROweb.log 43.0 KB errors=88 warnings=2
Log files: Processor-0.log 2.0 KB errors=0 warnings=1
Log files: Tables-0.log n/a
Log files: TestDropBox.log n/a
Log files: master.err 0.0 KB
Log files: master.out 0.0 KB
Log files: Total size 3.40 MB
Parsing Blitz-0.log:[line:69] => Server restarted <=
Environment:OMERO_HOME=(unset)
Environment:OMERO_NODE=(unset)
Environment:OMERO_MASTER=(unset)
Environment:PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/omero/bin
Environment:ICE_HOME=(unset)
Environment:LD_LIBRARY_PATH=(unset)
Environment:DYLD_LIBRARY_PATH=(unset)
EDIT: I looked into the matplotlib documentation and found this
matplotlib documentation on http://matplotlib.sourceforge.net/faq/h ... ion-server wrote:Many users report initial problems trying to use maptlotlib in web application servers, because by default matplotlib ships configured to work with a graphical user interface which may require an X11 connection. Since many barebones application servers do not have X11 enabled, you may get errors if you don’t configure matplotlib for use in these environments. Most importantly, you need to decide what kinds of images you want to generate (PNG, PDF, SVG) and configure the appropriate default backend. For 99% of users, this will be the Agg backend, which uses the C++ antigrain rendering engine to make nice PNGs. The Agg backend is also configured to recognize requests to generate other output formats (PDF, PS, EPS, SVG). The easiest way to configure matplotlib to use Agg is to call:
- Code: Select all
# do this before importing pylab or pyplot
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
I don't know python but I looked into ''lib/python/omeroweb/webadmin/views.py'' and found something that already said ''agg''.
- Code: Select all
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
import numpy as np
import matplotlib.pyplot as plt
from pylab import *