OSError when exporting figure in EPS

Hi,
I upgraded today to matplotlib 0.87.3, compiled from source.
I noticed the following error when in my application I try to export the plot in EPS format. The odd thing is that the export actually works and produces a good eps file, but nevertheless...

File "hooke.py", line 354, in ExportImage #that's my wxpython+MPL app
     self.figure.savefig(filename)
   File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line 660, in savefig
     self.canvas.print_figure(*args, **kwargs)
   File "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py", line 1123, in print_figure
     else: shutil.move(tmpfile, outfile)
   File "/usr/lib/python2.4/shutil.py", line 193, in move
     copy2(src,dst)
   File "/usr/lib/python2.4/shutil.py", line 93, in copy2
     copystat(src, dst)
   File "/usr/lib/python2.4/shutil.py", line 68, in copystat
     os.utime(dst, (st.st_atime, st.st_mtime))
OSError: [Errno 1] Operation not permitted: 'figura001.eps'

Thanks as usual!

Massimo

···

--
Massimo Sandal
University of Bologna
Department of Biochemistry "G.Moruzzi"

snail mail:
Via Irnerio 48, 40126 Bologna, Italy

email:
massimo.sandal@...898...

tel: +39-051-2094388
fax: +39-051-2094387

please submit a short script that reproduces the problem.

···

On Thursday 08 June 2006 10:35, massimo sandal wrote:

Hi,
I upgraded today to matplotlib 0.87.3, compiled from source.
I noticed the following error when in my application I try to export the
plot in EPS format. The odd thing is that the export actually works and
produces a good eps file, but nevertheless...

File "hooke.py", line 354, in ExportImage #that's my wxpython+MPL app
     self.figure.savefig(filename)
   File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line
660, in savefig
     self.canvas.print_figure(*args, **kwargs)
   File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py",
line 1123, in print_figure
     else: shutil.move(tmpfile, outfile)
   File "/usr/lib/python2.4/shutil.py", line 193, in move
     copy2(src,dst)
   File "/usr/lib/python2.4/shutil.py", line 93, in copy2
     copystat(src, dst)
   File "/usr/lib/python2.4/shutil.py", line 68, in copystat
     os.utime(dst, (st.st_atime, st.st_mtime))
OSError: [Errno 1] Operation not permitted: 'figura001.eps'

Darren Dale ha scritto:

I noticed the following error when in my application I try to export the
plot in EPS format. The odd thing is that the export actually works and
produces a good eps file, but nevertheless...

File "hooke.py", line 354, in ExportImage #that's my wxpython+MPL app
     self.figure.savefig(filename)
   File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line
660, in savefig
     self.canvas.print_figure(*args, **kwargs)
   File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py",
line 1123, in print_figure
     else: shutil.move(tmpfile, outfile)
   File "/usr/lib/python2.4/shutil.py", line 193, in move
     copy2(src,dst)
   File "/usr/lib/python2.4/shutil.py", line 93, in copy2
     copystat(src, dst)
   File "/usr/lib/python2.4/shutil.py", line 68, in copystat
     os.utime(dst, (st.st_atime, st.st_mtime))
OSError: [Errno 1] Operation not permitted: 'figura001.eps'

please submit a short script that reproduces the problem.

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,
m.

···

--
Massimo Sandal
University of Bologna
Department of Biochemistry "G.Moruzzi"

snail mail:
Via Irnerio 48, 40126 Bologna, Italy

email:
massimo.sandal@...898...

tel: +39-051-2094388
fax: +39-051-2094387

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:

Darren Dale ha scritto:
>> I noticed the following error when in my application I try to export the
>> plot in EPS format. The odd thing is that the export actually works and
>> produces a good eps file, but nevertheless...
>>
>> File "hooke.py", line 354, in ExportImage #that's my wxpython+MPL app
>> self.figure.savefig(filename)
>> File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line
>> 660, in savefig
>> self.canvas.print_figure(*args, **kwargs)
>> File
>> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py",
>> line 1123, in print_figure
>> else: shutil.move(tmpfile, outfile)
>> File "/usr/lib/python2.4/shutil.py", line 193, in move
>> copy2(src,dst)
>> File "/usr/lib/python2.4/shutil.py", line 93, in copy2
>> copystat(src, dst)
>> File "/usr/lib/python2.4/shutil.py", line 68, in copystat
>> os.utime(dst, (st.st_atime, st.st_mtime))
>> OSError: [Errno 1] Operation not permitted: 'figura001.eps'
>
> please submit a short script that reproduces the problem.

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,
m.

--
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853

dd55@...163...
office: (607) 255-9894
fax: (607) 255-9001

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

···

On 6/9/06, Darren Dale <dd55@...163...> 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,

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

, 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:
massimo.sandal@...898...

tel: +39-051-2094388
fax: +39-051-2094387

This shows the benefits of 'xmode verbose' :slight_smile: There's enough info in
that traceback to understand the problem:

/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py in
print_figure(self=<matplotlib.backends.backend_ps.FigureCanvasPS
>, 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,

This is the call that fails. To confirm this is the problem, try:

shutil.move('/tmp/foo','/fat32partition/foo')

With any valid /tmp/foo file and your actual path to your fat32
partition. If this also fails, it's because this copystat() call

/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

which in turn tries to call utime():

/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'

is somehow not OK for fat32 partitions, or because you don't have the
right permissions on your system.

You need to be sure that you have your fat32 partition mounted with
the right user permissions, otherwise things like these can fail.

At this point, it's not yet clear if this is a problem with backend_ps
in mpl or your permissions configuration.

Cheers,

f

Fernando Perez ha scritto:

This shows the benefits of 'xmode verbose' :slight_smile: There's enough info in
that traceback to understand the problem:

This is the call that fails. To confirm this is the problem, try:

shutil.move('/tmp/foo','/fat32partition/foo')
With any valid /tmp/foo file and your actual path to your fat32
partition.

Yes, it fails in the same way:

In [5]: xmode verbose
Exception reporting mode: Verbose

In [6]: shutil.move('/tmp/tmp_Tzxny','/users/Massimo/')

···

---------------------------------------------------------------------------
exceptions.OSError Traceback (most recent call last)

/home/massimo/<ipython console>

/usr/lib/python2.4/shutil.py in move(src='/tmp/tmp_Tzxny', dst='/users/Massimo/')
     191 rmtree(src)
     192 else:
--> 193 copy2(src,dst)
         global copy2 = <function copy2 at 0xb7d8bb1c>
         src = '/tmp/tmp_Tzxny'
         dst = '/users/Massimo/'
     194 os.unlink(src)
     195

/usr/lib/python2.4/shutil.py in copy2(src='/tmp/tmp_Tzxny', dst='/users/Massimo/tmp_Tzxny')
      91 dst = os.path.join(dst, os.path.basename(src))
      92 copyfile(src, dst)
---> 93 copystat(src, dst)
         global copystat = <function copystat at 0xb7d8baac>
         src = '/tmp/tmp_Tzxny'
         dst = '/users/Massimo/tmp_Tzxny'
      94
      95

/usr/lib/python2.4/shutil.py in copystat(src='/tmp/tmp_Tzxny', dst='/users/Massimo/tmp_Tzxny')
      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 = '/users/Massimo/tmp_Tzxny'
         st.st_atime = 1150188691
         st.st_mtime = 1149762561
      69 if hasattr(os, 'chmod'):
      70 os.chmod(dst, mode)

OSError: [Errno 1] Operation not permitted: '/users/Massimo/tmp_Tzxny'

which in turn tries to call utime():

/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'

is somehow not OK for fat32 partitions, or because you don't have the
right permissions on your system.

> You need to be sure that you have your fat32 partition mounted with
> the right user permissions, otherwise things like these can fail.

My /etc/mtab line for the partition is as follows:
/dev/hda7 /users vfat rw,utf8,umask=000,gid=46 0 0

this should mean everyone has full permissions on the partition, isn't it?

At this point, it's not yet clear if this is a problem with backend_ps
in mpl or your permissions configuration.

5-minute googling lets me wonder if it's a problem with os.utime() not always playing nice with fat32 partitions... odd because on my previous debian sarge with the same configuration, it didn't complain.

m.

--
Massimo Sandal
University of Bologna
Department of Biochemistry "G.Moruzzi"

snail mail:
Via Irnerio 48, 40126 Bologna, Italy

email:
massimo.sandal@...898...

tel: +39-051-2094388
fax: +39-051-2094387

Could be, but I'm not really sure. It would certainly be nice if the
python docs listed this as a limitation of shutil (if it is one).
Sorry but I won't be able to spend any further time on this one, I'm
afraid. I don't know of what reasonable workaround mpl could use
instead of shutil, which is supposed to be precisely a portability
layer against this kind of problem.

Cheers,

f

···

On 6/13/06, massimo sandal <massimo.sandal@...898...> wrote:

5-minute googling lets me wonder if it's a problem with os.utime() not
always playing nice with fat32 partitions... odd because on my previous
debian sarge with the same configuration, it didn't complain.