[mod_python] Broken pipe

Lionel Roubeyrie lroubeyrie at limair.asso.fr
Wed Jan 26 10:31:02 EST 2005


Hi all,
I need to transform a .eps file into a .jpg or .png file. Using a simple 
script with the PIL works fine:
#################################
def convert(infile, outfile):
    import Image
    fp = Image.open(infile)
    fp.save(outfile)
    return outfile
#################################

then convert('tutu.eps', 'tutu.jpg') is ok, not if I call it in mod_python:
#################################
File "/home/lionel/cartair.py", line 502, in convert
    fp.save(outfile)
  File "/usr/lib/python2.3/site-packages/PIL/Image.py", line 1125, in save
    self.load()
  File "/usr/lib/python2.3/site-packages/PIL/EpsImagePlugin.py", line 282, in 
load
    self.im = Ghostscript(self.tile, self.size, self.fp)
  File "/usr/lib/python2.3/site-packages/PIL/EpsImagePlugin.py", line 73, in 
Ghostscript
    gs.write(s)
IOError: [Errno 32] Broken pipe
#################################
Do I have to change something?
Thanks

-- 
Lionel Roubeyrie - lroubeyrie at limair.asso.fr
LIMAIR
http://www.limair.asso.fr




More information about the Mod_python mailing list