On 6/9/06, Darren Dale <[EMAIL PROTECTED]> wrote: > I cant reproduce this. Are you sure it's a problem with matplotlib? It looks > like its a problem with shutil and os.utime, not mpl. Are you sure you have > write privileges for the file and the directory? Could another (k)ubuntu > Dapper user please give this a try? > > On Friday 09 June 2006 11:42, massimo sandal wrote:
> > I have just reproduced it by doing an histogram in an interactive > > ipython --pylab session and then exporting as 'figure.eps'. > > > > Just: > > a=[...] <--numbers to histogram > > hist(a) > > savefig('hist001.eps') > > > > gives: > > > > exceptions.OSError Traceback (most > > recent call last) > > > > /users/Massimo/synuclein/<ipython console> > > > > /usr/lib/python2.4/site-packages/matplotlib/pylab.py in savefig(*args, > > **kwargs) > > 809 def savefig(*args, **kwargs): > > 810 fig = gcf() > > --> 811 return fig.savefig(*args, **kwargs) > > 812 if Figure.savefig.__doc__ is not None: > > 813 savefig.__doc__ = _shift_string(Figure.savefig.__doc__) > > > > /usr/lib/python2.4/site-packages/matplotlib/figure.py in savefig(self, > > *args, **kwargs) > > 658 kwargs[key] = rcParams['savefig.%s'%key] > > 659 > > --> 660 self.canvas.print_figure(*args, **kwargs) > > 661 > > 662 def colorbar(self, mappable, cax=None, **kw): > > > > /usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py > > in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, > > **kwargs) > > 110 try: > > 111 agg.print_figure(filename, dpi, facecolor, > > edgecolor, > > --> 112 orientation, **kwargs) > > 113 except IOError, msg: > > 114 error_msg_gtk('Failed to save\nError message: > > %s'%(msg,), self) > > > > /usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py in > > print_figure(self, filename, dpi, facecolor, edgecolor, orientation, > > **kwargs) > > 482 ps = self.switch_backends(FigureCanvasPS) > > 483 ps.print_figure(filename, dpi, facecolor, > > edgecolor, > > --> 484 orientation, **kwargs) > > 485 else: > > 486 raise IOError('Do not know know to handle > > extension *%s' % ext) > > > > /usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py in > > print_figure(self, outfile, dpi, facecolor, edgecolor, orientation, > > papertype) > > 1121 fh = file(tmpfile) > > 1122 print >>outfile, fh.read() > > -> 1123 else: shutil.move(tmpfile, outfile) > > 1124 > > 1125 def _print_figure_tex(self, outfile, dpi, facecolor, > > edgecolor, orientation, > > > > /usr/lib/python2.4/shutil.py in move(src, dst) > > 191 rmtree(src) > > 192 else: > > --> 193 copy2(src,dst) > > 194 os.unlink(src) > > 195 > > > > /usr/lib/python2.4/shutil.py in copy2(src, dst) > > 91 dst = os.path.join(dst, os.path.basename(src)) > > 92 copyfile(src, dst) > > ---> 93 copystat(src, dst) > > 94 > > 95 > > > > /usr/lib/python2.4/shutil.py in copystat(src, dst) > > 66 mode = stat.S_IMODE(st.st_mode) > > 67 if hasattr(os, 'utime'): > > ---> 68 os.utime(dst, (st.st_atime, st.st_mtime)) > > 69 if hasattr(os, 'chmod'): > > 70 os.chmod(dst, mode) > > > > OSError: [Errno 1] Operation not permitted: 'hist001.eps' > > > > MPL is 0.87.3 compiled from source on gnu/linux Kubuntu 6.06 > > Thanks, Massimo, I'm away from my ubuntu machine right now, so I can't test this. In the meantime, try in ipython xmode verbose before running your code. This will generate a more detailed traceback, which might give us some clues. Cheers, f _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users