I probably should have sent this to the devel list instead of the user list.
Is anyone else running into a similar problem with Qt, or is something in my
install screwy?

Thanks,
-Tony

---------- Forwarded message ----------
From: Tony Yu <tsy...@gmail.com>
Date: Mon, Jul 18, 2011 at 5:58 PM
Subject: IOError: [Errno 4] Interrupted system call (Qt4 backend)
To: matplotlib-users <matplotlib-us...@lists.sourceforge.net>


When using the Qt4 backend, I'm getting an IOError similar to the one
detailed in:
http://old.nabble.com/matplotlib-with-Qt4-backend-td26311369.html
But it's definitely a separate issue (see Traceback below). This issue also
seems specific to Qt (I couldn't reproduce it on 'macosx', 'tkagg', or 'agg'
backends).

I found a number of other people who ran into similar problems with Qt.
Their solutions tend to be: catch the error and just try running the process
again.

I'm on Qt 4.7.3, OS X 10.6.8, Matplotlib trunk. Any help would be much
appreciated.

-Tony


Script reproducing issue
========================
import matplotlib
matplotlib.use('qt4agg')
import matplotlib.pyplot as plt

for n in xrange(300):
    plt.plot([0, 1])
    plt.savefig('test.jpg')
# Since it's a signaling issue, it gets triggered randomly, so the attached
# script may or not reproduce the issue.

Traceback
=========

traceback (most recent call last):
  File "qterror.py", line 8, in <module>
    plt.savefig('test.jpg')
  File "/Users/Tony/python/devel/mpl/lib/matplotlib/pyplot.py", line 428, in
savefig
    return fig.savefig(*args, **kwargs)
  File "/Users/Tony/python/devel/mpl/lib/matplotlib/figure.py", line 1162,
in savefig

    self.canvas.print_figure(*args, **kwargs)
  File
"/Users/Tony/python/devel/mpl/lib/matplotlib/backends/backend_qt4agg.py",
line
 153, in print_figure
    FigureCanvasAgg.print_figure(self, *args, **kwargs)
  File "/Users/Tony/python/devel/mpl/lib/matplotlib/backend_bases.py", line
1979, in
print_figure
    **kwargs)
  File "/Users/Tony/python/devel/mpl/lib/matplotlib/backend_bases.py", line
1799, in
print_jpg
    buf, size = agg.print_to_buffer()
  File
"/Users/Tony/python/devel/mpl/lib/matplotlib/backends/backend_agg.py", line
45
7, in print_to_buffer
    FigureCanvasAgg.draw(self)
  File
"/Users/Tony/python/devel/mpl/lib/matplotlib/backends/backend_agg.py", line
40
0, in draw
    self.renderer = self.get_renderer()
  File
"/Users/Tony/python/devel/mpl/lib/matplotlib/backends/backend_agg.py", line
41
1, in get_renderer
    self.renderer = RendererAgg(w, h, self.figure.dpi)
  File
"/Users/Tony/python/devel/mpl/lib/matplotlib/backends/backend_agg.py", line
51
, in __init__
    RendererBase.__init__(self)
  File "/Users/Tony/python/devel/mpl/lib/matplotlib/backend_bases.py", line
114, in _
_init__
    self._text2path = textpath.TextToPath()
   File "/Users/Tony/python/devel/mpl/lib/matplotlib/textpath.py", line 37,
in __init_
_
    self._adobe_standard_encoding = self._get_adobe_standard_encoding()
  File "/Users/Tony/python/devel/mpl/lib/matplotlib/textpath.py", line 41,
in _get_ad
obe_standard_encoding
    enc_name = dviread.find_tex_file('8a.enc')
  File "/Users/Tony/python/devel/mpl/lib/matplotlib/dviread.py", line 837,
in find_te
x_file
     result = pipe.communicate()[0].rstrip()
  File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subpro
cess.py", line 663, in communicate
    stdout = self.stdout.read()
IOError: [Errno 4] Interrupted system call
------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to