1
File "<stdin>", line 1, in <module>
  File "C:\Users\franc\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 32, in <module>
    import matplotlib.colorbar
  File "C:\Users\franc\Anaconda3\lib\site-packages\matplotlib\colorbar.py", line 32, in <module>
    import matplotlib.contour as contour
  File "C:\Users\franc\Anaconda3\lib\site-packages\matplotlib\contour.py", line 18, in <module>
    import matplotlib.font_manager as font_manager
  File "C:\Users\franc\Anaconda3\lib\site-packages\matplotlib\font_manager.py", line 1363, in <module>
    _rebuild()
  File "C:\Users\franc\Anaconda3\lib\site-packages\matplotlib\font_manager.py", line 1344, in _rebuild
    fontManager = FontManager()
  File "C:\Users\franc\Anaconda3\lib\site-packages\matplotlib\font_manager.py", line 978, in __init__
    ttffiles = findSystemFonts(paths) + findSystemFonts()
  File "C:\Users\franc\Anaconda3\lib\site-packages\matplotlib\font_manager.py", line 264, in findSystemFonts
    fontfiles.update(win32InstalledFonts(fontext=fontext))
TypeError: 'NoneType' object is not iterable

I've tried to uninstall and reinstall matplotlib in many ways, but I still get the above error.

9
  • 1
    Perhaps this, this, this or this helps you Commented Sep 22, 2018 at 16:15
  • thanks, but I've already seen this links. I'm using anaconda Commented Sep 22, 2018 at 16:21
  • which version of matplotlib are you using? Commented Sep 22, 2018 at 16:24
  • matplotlib 3.0.0 Commented Sep 22, 2018 at 16:26
  • Then it's this new error which is not yet fixed. Commented Sep 22, 2018 at 16:34

1 Answer 1

1

I met this problem and fixxed it with installing the old version. Try:

pip uninstall matplotlib

pip install -v matplotlib==2.2.2

It seem that this bug casued by the incorrect use of pathlib package in matplotlib.font_manager.py

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.