-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Bug in postscript backend in Python 3 #1779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The included patch seems to fix this for me. I'm not sure what workarounds are available, other than perhaps using the Cairo backend, or outputting PDF and converting to PS after the fact. |
@mdboom - I'm still testing this (applying the fix from #1791 too) but I'm seeing issues if I write to a
Note that the output is a string that contains |
Did a StringIO ever work on Python 3? I'd be surprised if it did. You would need to use a BytesIO (or a cStringIO.StringIO on Python 2, which is functionally the same thing). |
@mdboom - I think it was working with 1.2.0, but I'll double-check that. |
@mdboom - ignore me, apparently StringIO didn't ever work with Python 3 The attached patch does get rid of the error for me. However, the PS/EPS files produced don't show any content if opened. If I compare a PS file made in Python 3.2 vs 2.7, the one from 3.2 is missing a whole load of content. If you can't reproduce this, I can send you the files. |
In trying this, I did discover another bug (with a fix now attached). The following works for me, with identical content in Python 2 and 3 (modulo some dictionary ordering differences)
|
Looks good, and works for me - thanks! |
Bug in postscript backend in Python 3
The following examples demonstrates the issue:
In the mean time, is there a workaround?