Skip to content

New matplotlib (3.2.0) breaks the test suite #12176

Closed

Description

@itamarst

Trying to reproduce matplotlib-y errors in #12168, I did pip install --upgrade matplotlib, and now I'm getting the same errors, e.g.:

ERROR: Test color settings for latex_to_png.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/itamarst/Devel/ipython/venv/lib64/python3.7/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/itamarst/Devel/ipython/IPython/testing/decorators.py", line 212, in skipper_func
    return f(*args, **kwargs)
  File "/home/itamarst/Devel/ipython/IPython/lib/tests/test_latextools.py", line 144, in test_latex_to_png_color
    default_value = latextools.latex_to_png(latex_string, wrap=False)
  File "/home/itamarst/Devel/ipython/IPython/lib/latextools.py", line 104, in latex_to_png
    bin_data = f(s, wrap, color, scale)
  File "/home/itamarst/Devel/ipython/IPython/lib/latextools.py", line 126, in latex_to_png_mpl
    mt.to_png(f, s, fontsize=12, dpi=dpi, color=color)
  File "/home/itamarst/Devel/ipython/venv/lib64/python3.7/site-packages/matplotlib/mathtext.py", line 3436, in to_png
    with open(filename, "wb") as file:
TypeError: expected str, bytes or os.PathLike object, not _io.BytesIO

Activity

  1. itamarst commented on Mar 9, 2020

    @itamarst
    ContributorAuthor

    I will try to fix in order to unblock my PR.

  2. tacaswell commented on Mar 9, 2020

    @tacaswell
    Contributor

    Is there a Matplotlib issue for this? We should definitely fix this on the mpl side. In the meantime, it would be better to exclude the broken version of Matplotlib.

  3. itamarst commented on Mar 9, 2020

    @itamarst
    ContributorAuthor

    As discussed in the PR, there is an upstream issue and it'll be fixed in matplotlib 3.2.1.

  4. tacaswell commented on Mar 9, 2020

    @tacaswell
    Contributor

    Do you know what issue / PR fixed this?

  5. tacaswell commented on Mar 9, 2020

    @tacaswell
    Contributor
  6. kkirsche commented on Jan 14, 2022

    @kkirsche
    Contributor

    Should this issue be closed as the fix has been merged upstream?

  7. tacaswell commented on Jan 14, 2022

    @tacaswell
    Contributor

    Yes, this should be closed. Thank you for noticing @kkirsche!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions