Errors with PDF (TeX-string) output using Qt4Agg

<PHobson@...2792...> writes:

>C:\Documents and Settings\phobson>ipython26 -pylab

Could you try this in plain Python? I'm asking because you seem to be
getting an IPython warning about a possibly corrupted traceback:

ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (550, 0))

I suggest you write your commands in a script and run it with

python script.py --verbose-debug

so that we can get a better picture of where it is going wrong.

Also, does it matter that you are using Qt4Agg? You can test this by
trying

python script.py -d pdf --verbose-debug

If that works, then the problem could be related to Qt4Agg specifically,
but if it fails, it is somewhere else.

···

--
Jouni K. Seppänen
http://www.iki.fi/jks

Sheesh it's been a weird day. I failed to reply to the whole list.

Jouni, sorry about the duplciate message...

<PHobson@...2792...> writes:
> >C:\Documents and Settings\phobson>ipython26 -pylab

From: Jouni K. Seppänen [mailto:jks@…397…] Could you try this in
plain Python? I'm asking because you seem to be getting an IPython
warning about a possibly corrupted traceback:

> ERROR: An unexpected error occurred while tokenizing input The
> following traceback may be corrupted or invalid The error message
> is: ('EOF in multi-line statement', (550, 0))

I suggest you write your commands in a script and run it with

python script.py --verbose-debug

Jouni: Thanks for the prompt reply. I did just that. Calling the script both ways (w/ and w/o the PDF backend) fails with a lot of out. This time I've included the verbose output as an attached text file. I apologize of that's a mailing list faux pas. Here's the code for the script, pyTest.py:

import pylab as pl
x = pl.arange(6)
y = x + 5
pl.plot(x,y,'ko', zorder=10)
pl.xlabel('X-label, no TeX')
pl.ylabel('Y-label. no math')
pl.savefig('no_math.png')
pl.savefig('no_math.pdf')

pl.xlabel(r'some math: $\tau_{y}$')
pl.savefig('some_math.png')
pl.savefig('some_math.pdf')
# EOF

no_math.* and some_math.png are created just fine. The error occurred trying to create some_math.pdf.

I'm really at a loss b/c I could swear I created fairly complex figures with output to PDF about a week ago and don't recall changing my Python or MPL installation.

so that we can get a better picture of where it is going wrong.

Also, does it matter that you are using Qt4Agg? You can test this by
trying

Both seemed to provide the same error message, so I've only included the verbose output from C:\Python25>python c:\GDAG2009\python\pyTest.py -d pdf --verbose-debug

For grins and giggles, I went to my matplotlibrc file and commented out the lines telling MPL to use Droid fonts (even though they never gave me a problem before). That didn't change anything.

Thanks again,
-paul

pyTest_debug.txt (9.94 KB)