You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
======================================================================
ERROR: matplotlib.tests.test_backend_pgf.test_xelatex
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/mdboom/python/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 39, in failer
result = f(*args, **kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/tests/test_backend_pgf.py", line 30, in backend_switcher
result = func(*args, **kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/tests/test_backend_pgf.py", line 68, in test_xelatex
compare_figure('pgf_xelatex.pdf')
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/tests/test_backend_pgf.py", line 40, in compare_figure
plt.savefig(actual)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/pyplot.py", line 475, in savefig
return fig.savefig(*args, **kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/figure.py", line 1228, in savefig
self.canvas.print_figure(*args, **kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 2089, in print_figure
**kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/backends/backend_pgf.py", line 717, in print_pdf
raise RuntimeError("%s was not able to process your file.\n\nFull log:\n%s" % (texcommand, stdout))
UnboundLocalError: local variable 'stdout' referenced before assignment
E.E
======================================================================
ERROR: matplotlib.tests.test_backend_pgf.test_xelatex
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/mdboom/python/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 39, in failer
result = f(*args, **kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/tests/test_backend_pgf.py", line 30, in backend_switcher
result = func(*args, **kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/tests/test_backend_pgf.py", line 68, in test_xelatex
compare_figure('pgf_xelatex.pdf')
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/tests/test_backend_pgf.py", line 40, in compare_figure
plt.savefig(actual)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/pyplot.py", line 475, in savefig
return fig.savefig(*args, **kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/figure.py", line 1262, in savefig
self.canvas.print_figure(*args, **kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 2089, in print_figure
**kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/backends/backend_pgf.py", line 715, in print_pdf
raise RuntimeError("%s was not able to process your file.\n\nFull log:\n%s" % (texcommand, e.output))
RuntimeError: xelatex was not able to process your file.
Full log:
This is XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6)
%&-line parsing enabled.
entering extended mode
(./figure.tex
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng
erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish,
french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc
us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por
tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish,
turkish, ukenglish, ukrainian, loaded.
(/usr/share/texmf/tex/latex/base/minimal.cls
Document Class: minimal 2001/05/25 Standard LaTeX minimal class
) (/usr/share/texmf/tex/latex/geometry/geometry.sty
(/usr/share/texmf/tex/latex/graphics/keyval.sty)
(/usr/share/texmf/tex/xelatex/xetexconfig/geometry.cfg))
(/usr/share/texmf/tex/xelatex/fontspec/fontspec.sty
(/usr/share/texmf/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texmf/tex/latex/tools/calc.sty)
(/usr/share/texmf/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texmf/tex/latex/xkeyval/xkeyval.tex))
(/usr/share/texmf/tex/latex/lm/lmodern.sty)
(/usr/share/texmf/tex/latex/base/fontenc.sty
(/usr/share/texmf/tex/xelatex/euenc/eu1enc.def)
(/usr/share/texmf/tex/xelatex/euenc/lm/eu1lmr.fd))
fontspec.cfg loaded.
(/usr/share/texmf/tex/xelatex/fontspec/fontspec.cfg))
(/usr/share/texmf/tex/latex/pgf/basiclayer/pgf.sty
(/usr/share/texmf/tex/latex/pgf/utilities/pgfrcs.sty
(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-common.tex)
(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-latex.def)
(/usr/share/texmf/tex/generic/pgf/utilities/pgfrcs.code.tex))
(/usr/share/texmf/tex/latex/pgf/basiclayer/pgfcore.sty
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/latex/config/graphics.cfg)
(/usr/share/texmf/tex/xelatex/graphics/xetex.def)))
(/usr/share/texmf/tex/latex/pgf/systemlayer/pgfsys.sty
(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys.code.tex
(/usr/share/texmf/tex/generic/pgf/systemlayer/pgf.cfg)
! Package pgfsys Error: Driver file ``pgfsys-xetex.def'' not found..
See the pgfsys package documentation for explanation.
Type H <return> for immediate help.
...
l.847 ...ver file ``\pgfsysdriver'' not found.}{}}
No pages of output.
Transcript written on figure.log.
======================================================================
ERROR: matplotlib.tests.test_backend_pgf.test_rcupdate
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/mdboom/python/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 39, in failer
result = f(*args, **kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/tests/test_backend_pgf.py", line 30, in backend_switcher
result = func(*args, **kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/tests/test_backend_pgf.py", line 110, in test_rcupdate
compare_figure('pgf_rcupdate%d.pdf' % (i+1))
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/tests/test_backend_pgf.py", line 40, in compare_figure
plt.savefig(actual)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/pyplot.py", line 475, in savefig
return fig.savefig(*args, **kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/figure.py", line 1262, in savefig
self.canvas.print_figure(*args, **kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 2089, in print_figure
**kwargs)
File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/backends/backend_pgf.py", line 715, in print_pdf
raise RuntimeError("%s was not able to process your file.\n\nFull log:\n%s" % (texcommand, e.output))
RuntimeError: xelatex was not able to process your file.
Full log:
This is XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6)
%&-line parsing enabled.
entering extended mode
(./figure.tex
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng
erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish,
french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc
us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por
tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish,
turkish, ukenglish, ukrainian, loaded.
(/usr/share/texmf/tex/latex/base/minimal.cls
Document Class: minimal 2001/05/25 Standard LaTeX minimal class
) (/usr/share/texmf/tex/latex/geometry/geometry.sty
(/usr/share/texmf/tex/latex/graphics/keyval.sty)
(/usr/share/texmf/tex/xelatex/xetexconfig/geometry.cfg))
(/usr/share/texmf/tex/xelatex/fontspec/fontspec.sty
(/usr/share/texmf/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texmf/tex/latex/tools/calc.sty)
(/usr/share/texmf/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texmf/tex/latex/xkeyval/xkeyval.tex))
(/usr/share/texmf/tex/latex/lm/lmodern.sty)
(/usr/share/texmf/tex/latex/base/fontenc.sty
(/usr/share/texmf/tex/xelatex/euenc/eu1enc.def)
(/usr/share/texmf/tex/xelatex/euenc/lm/eu1lmr.fd))
fontspec.cfg loaded.
(/usr/share/texmf/tex/xelatex/fontspec/fontspec.cfg))
(/usr/share/texmf/tex/latex/pgf/basiclayer/pgf.sty
(/usr/share/texmf/tex/latex/pgf/utilities/pgfrcs.sty
(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-common.tex)
(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-latex.def)
(/usr/share/texmf/tex/generic/pgf/utilities/pgfrcs.code.tex))
(/usr/share/texmf/tex/latex/pgf/basiclayer/pgfcore.sty
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/latex/config/graphics.cfg)
(/usr/share/texmf/tex/xelatex/graphics/xetex.def)))
(/usr/share/texmf/tex/latex/pgf/systemlayer/pgfsys.sty
(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys.code.tex
(/usr/share/texmf/tex/generic/pgf/systemlayer/pgf.cfg)
! Package pgfsys Error: Driver file ``pgfsys-xetex.def'' not found..
See the pgfsys package documentation for explanation.
Type H <return> for immediate help.
...
l.847 ...ver file ``\pgfsysdriver'' not found.}{}}
No pages of output.
Transcript written on figure.log.
----------------------------------------------------------------------
Ran 3 tests in 1.188s
FAILED (errors=2)
Yea, that problem.. the reason for this is just an outdated TeX version. Fedora 17 distributes TeX Live 2007, which is now over 5 years old and these features were probably in a highly experimental stage at this time. I think the TeX Live 2009 in Ubuntu 2012 works but it is also 3 years old. I don't think there is much I can do at this point. Its a shame that distributions like debian, fedora and ubuntu continue to ship these packages since the net is full of bug reports concerning errors that were fixed years ago :/
The situation seems to improve however, but users are usually encouraged to install TeX themselves or find someone who provides packages for a recent texlive version..
Ok. No need to fix this bug, then, but I wonder if there's a way to detect the TeX version, and if too old, set the test to "known fail". There are other known fail tests in matplotlib, so you should be able to follow that model -- the only difference would be detecting the TeX version and figuring out what the cutoff should be.
So far I'm only checking for the existence of xelatex to mark the test as known-to-fail. It's complicated since texlive isn't the only distribution so it doesn't come down to checking one a single version number. One would have to check the version of the pgf/tikz package, which isn't possible if it cannot be loaded at all. What's the output of xelatex --version for you by the way?
I was worried it would be something complicated like that. I'm just concerned that we have a test in the suite the looks as if matplotlib is failing, when in fact it's just a problem with an external dependency. I wonder if there's a way to test for the error when xelatex is the wrong version and make the test pass, and only get nitpicky about the results if we actually got something real back from xelatex.
In any case, here's my version output:
>xelatex --version
XeTeX 3.141592-0.996 (Web2C 7.5.6)
kpathsea version 3.5.6
Copyright 2007 SIL International.
Kpathsea is copyright 2007 Karl Berry and Olaf Weber.
There is NO warranty. Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Kpathsea written by Karl Berry, Olaf Weber, and others.
Compiled with ICU version 3.4 [with modifications for XeTeX]
Compiled with zlib version 1.2.5; using 1.2.5
Compiled with FreeType2 version 2.4.8; using 2.4.8
Compiled with fontconfig version 2.8.0; using 2.8.0
Compiled with libpng version 1.5.8; using 1.5.10
Compiled with libpoppler
I first tried to check the pgf version number as well but the way knownfailureif works it would just add more confusion as a test is performed anyway and if it for some reason succeeds it is considered to be a failure too.
Activity
pwuertz commentedon Aug 21, 2012
Apparently there was an error compiling the latex document, but the error message is lost because I messed up the exception handling :).
Could you run this test again with the fixed version?
#1124
mdboom commentedon Aug 21, 2012
Here's what I get now:
pwuertz commentedon Aug 21, 2012
Yea, that problem.. the reason for this is just an outdated TeX version. Fedora 17 distributes TeX Live 2007, which is now over 5 years old and these features were probably in a highly experimental stage at this time. I think the TeX Live 2009 in Ubuntu 2012 works but it is also 3 years old. I don't think there is much I can do at this point. Its a shame that distributions like debian, fedora and ubuntu continue to ship these packages since the net is full of bug reports concerning errors that were fixed years ago :/
The situation seems to improve however, but users are usually encouraged to install TeX themselves or find someone who provides packages for a recent texlive version..
mdboom commentedon Aug 21, 2012
Ok. No need to fix this bug, then, but I wonder if there's a way to detect the TeX version, and if too old, set the test to "known fail". There are other known fail tests in matplotlib, so you should be able to follow that model -- the only difference would be detecting the TeX version and figuring out what the cutoff should be.
pwuertz commentedon Aug 21, 2012
So far I'm only checking for the existence of xelatex to mark the test as known-to-fail. It's complicated since texlive isn't the only distribution so it doesn't come down to checking one a single version number. One would have to check the version of the pgf/tikz package, which isn't possible if it cannot be loaded at all. What's the output of
xelatex --versionfor you by the way?mdboom commentedon Aug 21, 2012
I was worried it would be something complicated like that. I'm just concerned that we have a test in the suite the looks as if matplotlib is failing, when in fact it's just a problem with an external dependency. I wonder if there's a way to test for the error when xelatex is the wrong version and make the test pass, and only get nitpicky about the results if we actually got something real back from xelatex.
In any case, here's my version output:
pwuertz commentedon Aug 21, 2012
Hm.. I wonder if I should mention that in the documentation :)
pwuertz commentedon Aug 21, 2012
.. no there is no real version information of use in there..
I just extended the check in the test module so it tries to run a latex process that loads the pgf package.
https://github.com/pwuertz/matplotlib/commit/8cf75b749591cdb6784d434207cc62abf3b8d5ae
I first tried to check the pgf version number as well but the way
knownfailureifworks it would just add more confusion as a test is performed anyway and if it for some reason succeeds it is considered to be a failure too.Hope this works for you.