.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        Click :ref:`here <sphx_glr_download_auto_examples_plot_scraper_broken.py>`     to download the full example code
    .. rst-class:: sphx-glr-example-title

    .. _sphx_glr_auto_examples_plot_scraper_broken.py:


Error during scraping
=====================

The error is actually introduced by the resetter in ``conf.py``. It mocks
a "zero-size reduction" error in ``fig.savefig``.


.. rst-class:: sphx-glr-script-out


.. code-block:: pytb

    Traceback (most recent call last):
      File "/home/lucy/Documents/sphinx-gallery/sphinx_gallery/scrapers.py", line 335, in save_figures
        rst = scraper(block, block_vars, gallery_conf)
      File "/home/lucy/Documents/sphinx-gallery/sphinx_gallery/tests/tinybuild/conf.py", line 17, in __call__
        return matplotlib_scraper(block, block_vars, gallery_conf, **kwargs)
      File "/home/lucy/Documents/sphinx-gallery/sphinx_gallery/scrapers.py", line 151, in matplotlib_scraper
        fig.savefig(image_path, **these_kwargs)
      File "/home/lucy/Documents/sphinx-gallery/sphinx_gallery/tests/tinybuild/conf.py", line 43, in <lambda>
        Figure.savefig = lambda *args, **kwargs: np.min([])
      File "<__array_function__ internals>", line 6, in amin
      File "/home/lucy/miniconda3/envs/sphinx/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2746, in amin
        keepdims=keepdims, initial=initial, where=where)
      File "/home/lucy/miniconda3/envs/sphinx/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 90, in _wrapreduction
        return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
    ValueError: zero-size array to reduction operation minimum which has no identity






|


.. code-block:: python3


    import matplotlib.pyplot as plt
    fig = plt.figure()


.. rst-class:: sphx-glr-timing

   **Total running time of the script:** ( 0 minutes  0.231 seconds)


.. _sphx_glr_download_auto_examples_plot_scraper_broken.py:


.. only :: html

 .. container:: sphx-glr-footer
    :class: sphx-glr-footer-example



  .. container:: sphx-glr-download sphx-glr-download-python

     :download:`Download Python source code: plot_scraper_broken.py <plot_scraper_broken.py>`



  .. container:: sphx-glr-download sphx-glr-download-jupyter

     :download:`Download Jupyter notebook: plot_scraper_broken.ipynb <plot_scraper_broken.ipynb>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
