question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New matplotlib (3.2.0) breaks the test suite

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
tacaswellcommented, Jan 14, 2022

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

0reactions
kkirschecommented, Jan 14, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Whats New — Matplotlib 3.2.0 documentation
The first argument is the mapping to be normalized, and the second argument can be an artist class or an artist instance (it...
Read more >
API Changes — Matplotlib 3.2.0 documentation
If updating Matplotlib breaks your scripts, this list may help you figure out what caused the breakage and how to fix it by...
Read more >
GitHub statistics for 3.2.0 (Mar 04, 2020) - Matplotlib
PR #15556: Fix test suite compat with ghostscript 9.50. ... PR #15180: Add some more internal links to 3.2.0 what's new.
Read more >
Installing — Matplotlib 3.2.0 documentation
To run the test suite: extract the lib/matplotlib/tests or lib/mpl_toolkits/tests directories from the source distribution;; install test ...
Read more >
API Changes for 3.1.0 — Matplotlib 3.6.2 documentation
Testing. Dependency changes. Mathtext changes. Signature deprecations. Changes in parameter names. Class/method/attribute deprecations. Undeprecations. New ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found