title: Python Barcode Generation
body: <p>I'm using the elaphe package for python to generate ean-13 barcode images. The package was installed from source using the tar file found at <a href="https://pypi.python.org/pypi/elaphe" rel="nofollow">https://pypi.python.org/pypi/elaphe</a>.</p>
  
  <p>When I run the code:</p>
  
  <pre><code>BARCODE_IMAGE_PATH = "/tmp/"
  
  def create_barcode_image(product_barcode):
  
      path = BARCODE_IMAGE_PATH + product_barcode + '.png'
  
      img = barcode('ean13', product_barcode, 
                    options=dict(includetext=True, height=0.4), margin=1)
      img.save(path, 'PNG')
  
      return path 
  </code></pre>
  
  <p>from the python interpreter it seems to work perfectly. The correct barcode is generated to the path that I specify. When I run it from apache using web.py as my web framework I receive the error:</p>
  
  <pre><code>Traceback (most recent call last):
    ...
       img_path = create_barcode_image(barcode)
     File "/var/www/py/documents/barcode_images.py", line 27, in create_barcode_image
       img.save(path, 'PNG')
     File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 1406, in save
       self.load()
     File "/usr/local/lib/python2.7/dist-packages/PIL/EpsImagePlugin.py", line 283, in load
       self.im = Ghostscript(self.tile, self.size, self.fp)
     File "/usr/local/lib/python2.7/dist-packages/PIL/EpsImagePlugin.py", line 75, in Ghostscript
       raise IOError("gs failed (status %d)" % status)
   IOError: gs failed (status 256) 
  </code></pre>
  
  <p>Does anyone know what might be causing this error or how to go about debugging it? </p>