Skip to content

BLD: _check_plot_works(df.plot) in test results in RuntimeError: Error building image #4213

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

Closed
yarikoptic opened this issue Jul 11, 2013 · 11 comments
Labels
Testing pandas testing functions or related to the test suite
Milestone

Comments

@yarikoptic
Copy link
Contributor

While building debian package for 0.11.0+git43-g7b2eaa4, matplotlib 1.1.1~rc2-1 and while building it should use Agg backend, that is how tests are invoked

python-test%: python-install%
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
        echo "backend : Agg" >| $(CURDIR)/build/matplotlibrc
        : # Run unittests here against installed pandas
        echo "$*" | grep -q '^3' && PY=3 || PY=$*; \
        export PYTHONPATH=`/bin/ls -d $$PWD/debian/tmp/usr/lib/python$$PY/*/`; \
        export MPLCONFIGDIR=$(CURDIR)/build HOME=$(CURDIR)/build; \
        cd build/; python$* /usr/bin/nosetests -s -v -a '!network' $(EXCLUDE_TESTS$*) pandas;
else
        : # Skip unittests due to nocheck
endif

and here is a prototypical error (there is more for other invocations for the _check):

======================================================================
ERROR: test_line_plot_period_frame (pandas.tseries.tests.test_plotting.TestTSPlot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yoh/deb/gits/pkg-exppsy/build-area/pandas-0.11.0+git43-g7b2eaa4/debian/tmp/usr/lib/python2.7/dist-packages/pandas/tseries/tests/test_plotting.py", line 165, in test_line_plot_period_frame
    _check_plot_works(df.plot, df.index.freq)
  File "/home/yoh/deb/gits/pkg-exppsy/build-area/pandas-0.11.0+git43-g7b2eaa4/debian/tmp/usr/lib/python2.7/dist-packages/pandas/tseries/tests/test_plotting.py", line 1006, in _check_plot_works
    plt.savefig(path)
  File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 471, in savefig
    return fig.savefig(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 1185, in savefig
    self.canvas.print_figure(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 2021, in print_figure
    **kwargs)
  File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line 477, in print_png
    filename_or_obj, self.figure.dpi)
RuntimeError: Error building image
@jreback
Copy link
Contributor

jreback commented Jul 11, 2013

this still happens with the 0.12 repo?

0.11.0+git43-g7b2eaa4,

@yarikoptic
Copy link
Contributor Author

sorry for initial misleading version -- it was 0.12 -- treeish 7b2eaa4 . This error didn't happen though whenever I upgraded to bs4 4.2.1 (See #4214) -- which is strange . because it is not related, is it?

@cpcloud
Copy link
Member

cpcloud commented Jul 13, 2013

bs4 has nothing to do with matplotlib so it must be a version issue

@cpcloud
Copy link
Member

cpcloud commented Jul 13, 2013

since you upgraded bs4 at the same time as you fixed the version that's probably what fixed the issue

@jreback
Copy link
Contributor

jreback commented Jul 14, 2013

@yarikoptic give a run on latest master....cross fingers all errors fixed

@cpcloud
Copy link
Member

cpcloud commented Jul 16, 2013

@yarikoptic any news on this front?

@cpcloud
Copy link
Member

cpcloud commented Jul 17, 2013

@yarikoptic could this be a libpng issue? found an old sage ticket ...

http://trac.sagemath.org/sage_trac/ticket/9529

@yarikoptic
Copy link
Contributor Author

it looks like it was some intermittent (or somehow addressed later) issue -- it did not replicate later on

$> grep test_line_plot_period_frame pandas_0.1[12]*_amd64.build         
pandas_0.11.0-2_amd64.build:test_line_plot_period_frame (pandas.tseries.tests.test_plotting.TestTSPlot) ... ok
pandas_0.11.0+git43-g7b2eaa4-1_amd64.build:test_line_plot_period_frame (pandas.tseries.tests.test_plotting.TestTSPlot) ... libpng error: Write Error
pandas_0.11.0+git43-g7b2eaa4-1_amd64.build:ERROR: test_line_plot_period_frame (pandas.tseries.tests.test_plotting.TestTSPlot)
pandas_0.11.0+git43-g7b2eaa4-1_amd64.build:  File "/home/yoh/deb/gits/pkg-exppsy/build-area/pandas-0.11.0+git43-g7b2eaa4/debian/tmp/usr/lib/python2.7/dist-packages/pandas/tseries/tests/test_plotting.py", line 165, in test_line_plot_period_frame
pandas_0.12.0~rc1+git101-gd070a1f-1_amd64.build:test_line_plot_period_frame (pandas.tseries.tests.test_plotting.TestTSPlot) ... ok
pandas_0.12.0~rc1+git43-g7b2eaa4-1_amd64.build:test_line_plot_period_frame (pandas.tseries.tests.test_plotting.TestTSPlot) ... ok
pandas_0.12.0~rc1+git79-g50eff60-1_amd64.build:test_line_plot_period_frame (pandas.tseries.tests.test_plotting.TestTSPlot) ... ok
pandas_0.12.0~rc1+git90-g4c2d050-1_amd64.build:test_line_plot_period_frame (pandas.tseries.tests.test_plotting.TestTSPlot) ... ok

so I am closing this issue for now.

sagemath link -- thanks @cpcloud, but unfortunately it 503 Service Unavailable for me ATM :-/ so can't say. FWIW I have

ii  libpng12-0:amd64                                  1.2.49-4                      amd64                         PNG library - runtime
ii  libpng12-0:i386                                   1.2.49-4                      i386                          PNG library - runtime
un  libpng12-0-dev                                    <none>                                                      (no description available)
ii  libpng12-dev                                      1.2.49-4                      amd64                         PNG library - development
ii  libpng15-15:amd64                                 1.5.11-1                      amd64                         PNG library - runtime

@cpcloud
Copy link
Member

cpcloud commented Jul 18, 2013

@yarikoptic i'm getting that issue now too .... weird

@cpcloud
Copy link
Member

cpcloud commented Jul 18, 2013

btw, thanks very much for all of your reports! 😄

@yarikoptic
Copy link
Contributor Author

"pleasure" is mine ;)

On Wed, 17 Jul 2013, Phillip Cloud wrote:

btw, thanks very much for all of your reports! [1]:smile:

Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Senior Research Associate, Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

No branches or pull requests

3 participants