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.
I noticed that I get the error only when I write on a FAT32 partition
that I use to exchange file with Windows. Writing on my /home ext3
partition gives no error.
I guess MPL is trying to put some attribute on the saved file that is
not supported by FAT32.
Down here there's the "xmode verbose" traceback
In [11]: savefig('prova.eps')
---------------------------------------------------------------------------
exceptions.OSError Traceback (most
recent call last)
/users/Massimo/synuclein/<ipython console>
/usr/lib/python2.4/site-packages/matplotlib/pylab.py in
savefig(*args=('prova.eps',), **kwargs={})
809 def savefig(*args, **kwargs):
810 fig = gcf()
--> 811 return fig.savefig(*args, **kwargs)
fig.savefig = <bound method Figure.savefig of
<matplotlib.figure.Figure instance at 0xb5c02e8c>>
args = ('prova.eps',)
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=<matplotlib.figure.Figure instance>, *args=('prova.eps',),
**kwargs={'dpi': 100.0, 'edgecolor': 'white', 'facecolor': 'white'})
658 kwargs[key] = rcParams['savefig.%s'%key]
659
--> 660 self.canvas.print_figure(*args, **kwargs)
self.canvas.print_figure = <bound method
FigureCanvasPS.print_figure of
<matplotlib.backends.backend_ps.FigureCanvasPS instance at 0xb42f886c>>
args = ('prova.eps',)
kwargs = {'edgecolor': 'white', 'facecolor': 'white', 'dpi': 100.0}
661
662 def colorbar(self, mappable, cax=None, **kw):
/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py in
print_figure(self=<matplotlib.backends.backend_ps.FigureCanvasPS
instance>, outfile='prova.eps', dpi=100.0, facecolor='white',
edgecolor='white', orientation='portrait', papertype='letter')
1121 fh = file(tmpfile)
1122 print >>outfile, fh.read()
-> 1123 else: shutil.move(tmpfile, outfile)
global shutil.move = <function move at 0xb7dc3bc4>
tmpfile = '/tmp/caba709a5ee736ae3148af077a1a9a38'
outfile = 'prova.eps'
1124
1125 def _print_figure_tex(self, outfile, dpi, facecolor,
edgecolor, orientation,
/usr/lib/python2.4/shutil.py in
move(src='/tmp/caba709a5ee736ae3148af077a1a9a38', dst='prova.eps')
191 rmtree(src)
192 else:
--> 193 copy2(src,dst)
global copy2 = <function copy2 at 0xb7dc3b1c>
src = '/tmp/caba709a5ee736ae3148af077a1a9a38'
dst = 'prova.eps'
194 os.unlink(src)
195
/usr/lib/python2.4/shutil.py in
copy2(src='/tmp/caba709a5ee736ae3148af077a1a9a38', dst='prova.eps')
91 dst = os.path.join(dst, os.path.basename(src))
92 copyfile(src, dst)
---> 93 copystat(src, dst)
global copystat = <function copystat at 0xb7dc3aac>
src = '/tmp/caba709a5ee736ae3148af077a1a9a38'
dst = 'prova.eps'
94
95
/usr/lib/python2.4/shutil.py in
copystat(src='/tmp/caba709a5ee736ae3148af077a1a9a38', dst='prova.eps')
66 mode = stat.S_IMODE(st.st_mode)
67 if hasattr(os, 'utime'):
---> 68 os.utime(dst, (st.st_atime, st.st_mtime))
global os.utime = <built-in function utime>
dst = 'prova.eps'
st.st_atime = 1150101622
st.st_mtime = 1150101622
69 if hasattr(os, 'chmod'):
70 os.chmod(dst, mode)
OSError: [Errno 1] Operation not permitted: 'prova.eps'
--
Massimo Sandal
University of Bologna
Department of Biochemistry "G.Moruzzi"
snail mail:
Via Irnerio 48, 40126 Bologna, Italy
email:
[EMAIL PROTECTED]
tel: +39-051-2094388
fax: +39-051-2094387
begin:vcard
fn:Massimo Sandal
n:Sandal;Massimo
org:University of Bologna;Department of Biochemistry
adr:;;Via Irnerio 48;Bologna;;40126;Italy
email;internet:[EMAIL PROTECTED]
tel;work:+39-051-2094388
tel;fax:+39-051-2094387
x-mozilla-html:FALSE
version:2.1
end:vcard
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users