Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6849053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:56:35+00:00 2026-05-27T00:56:35+00:00

I would like to use Elaphe to generate barcodes. I am getting gs failed

  • 0

I would like to use Elaphe to generate barcodes.

I am getting gs failed errors when I run the example codes.

I am working on a 64-bit windows machine. I have python 2.7.1 for win32 installed because win32 was required for certain packages. SO, I installed Ghostscript 9.0.4 win 32. I added the correct path to the PATH variable.

I installed elaphe, the python imaging library, and the python ghostscript 0.41 egg using easy_install (not sure if this was necessary).

I can import elaphe and PIL into python and execute commands without error. Whenever I try to save the barcodes as images I get errors.

When I run this simple usage example:

>>> from elaphe import barcode
>>> barcode('qrcode',
...         'Hello Barcode Writer In Pure PostScript.',
...         options=dict(version=9, eclevel='M'), 
...         margin=10, data_mode='8bits'))   # Generates PIL.EpsImageFile instance
<PIL.EpsImagePlugin.EpsImageFile instance at ...>
>>> _.show()            # Show the image

I get IOError: [Errno 32] Broken pipe

and when I run this to check on the ghostscript and PIL install:

# coding: utf-8                                                                 
from StringIO import StringIO
from PIL.EpsImagePlugin import EpsImageFile

src = """%!PS-Adobe 2.0                                                         
%%BoundingBox: 0 0 144 144                                                      
36 36 72 72 rectfill                                                            
/Courier findfont 12 scalefont setfont                                          
36 120 moveto (text) show                                                       
showpage                                                                        
"""

im = EpsImageFile(StringIO(src))
im.save('foo.png')

I get IOError: gs failed (status 1)

I tried installing Ghostscript for win64 but I get the same errors.

Any suggestions on where to begin troubleshooting? I can run the ghostscript executables and a command window pops up and I added the correct path to the env path variable.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:56:36+00:00Added an answer on May 27, 2026 at 12:56 am

    You need to capture the Ghostscript output to see what the error message is. This is normally written to stderr, I have no idea where this might be going in the Python library but you really need to see this to figure out why Ghostscript is exiting.

    You also need to see it to find out if Ghostscript is even being executed. It sounds to me like it isn’t but I don’t know anything about the “python ghostscript 0.41 egg”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like use .appendTo() on different elements determined by a function. For example,
I am using AdoNetAppender (SQL server) in my asp.net application and would like use
I would like to use a language that I am familiar with - Java,
I would like to use something like CLR Profiles on .Net 2.0 to see
I would like to use as and is as members of an enumeration. I
I would like to use a component that exposes the datasource property, but instead
I would like to use client-side Javascript to perform a DNS lookup (hostname to
I would like to use javascript to develop general-purpose GUI applications. Initially these are
I would like to use my laptop as a web development (PHP, Python, etc.)
I would like to use Emacs to edit some VB6 files but Emacs does

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.