[Scipy-tickets] [SciPy] #741: Importing scipy.cluster raises a RuntimeError caused by pylab

SciPy scipy-tickets@scipy....
Tue Sep 23 05:14:15 CDT 2008


#741: Importing scipy.cluster raises a RuntimeError caused by pylab
---------------------------+------------------------------------------------
 Reporter:  jpaalasm       |       Owner:  somebody
     Type:  defect         |      Status:  new     
 Priority:  normal         |   Milestone:  0.7.0   
Component:  scipy.cluster  |     Version:          
 Severity:  normal         |    Keywords:          
---------------------------+------------------------------------------------
 When importing scipy.cluster in an environment that does not support
 creating windows, a RuntimeError is raised.

 The following traceback was caused by a script that was run by Apache as a
 CGI script.

 {{{
 Traceback (most recent call last):
   File "/home/jpaalasm/code/clustering.py", line 2, in <module>
     import scipy.cluster
   File "/usr/local/lib/python2.5/site-packages/scipy/cluster/__init__.py",
 line 9, in <module>
     import vq, hierarchy, distance
   File "/usr/local/lib/python2.5/site-
 packages/scipy/cluster/hierarchy.py", line 1392, in <module>
     import matplotlib.pylab
   File "/usr/lib/python2.5/site-packages/matplotlib/pylab.py", line 292,
 in <module>
     from matplotlib.pyplot import *
   File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 37,
 in <module>
     new_figure_manager, draw_if_interactive, show = pylab_setup()
   File "/usr/lib/python2.5/site-packages/matplotlib/backends/__init__.py",
 line 24, in pylab_setup
     globals(),locals(),[backend_name])
   File "/usr/lib/python2.5/site-
 packages/matplotlib/backends/backend_gtkagg.py", line 10, in <module>
     from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK,
 FigureCanvasGTK,\
   File "/usr/lib/python2.5/site-
 packages/matplotlib/backends/backend_gtk.py", line 40, in <module>
     cursors.MOVE          : gdk.Cursor(gdk.FLEUR),
 RuntimeError: could not create GdkCursor object
 }}}

 Perhaps also RuntimeError should be catched in addition to ImportError in
 hierarchy.py when matplotlib.pylab is being imported.

-- 
Ticket URL: <http://scipy.org/scipy/scipy/ticket/741>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list