-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
failure on import due to IOError writing font cache #9548
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
Comments
It is configurable, but it should be going to your home directory by default. If you can get into an interactive debugger checking the value of Check from matplotlib import get_cachedir
import os
cachedir = get_cachedir()
print(os.path.join(cachedir, 'fontList.json')) on both systems. We probably should be more cautious when writing the cache out. Exact work:
|
tagged as 2.1.1 as this is a 'fail on import' type bug. |
Thanks @tacaswell ! your snippet is very useful for debugging this error! |
Re-opening this although the OP's issue is fixed, we should not be failing to import in cases like this @galactica147 thanks for taking the time to report this and glad it is working again. |
Hi Team, I am seeing this issue again. import seaborn as sn matplotlib version: 3.5.2 Can't clear the cache as don't have the permissions to do so. |
@av9ash Can you please make a new issue with this information? |
Ok will do, thanks. |
Bug report
Bug summary
When running a python script containing matplotlib module on a remote server machine, got the following errors:
File "path_to_env/lib/python2.7/site-packages/matplotlib/pyplot.py", line 29, in
import matplotlib.colorbar
File "path_to_env/lib/python2.7/site-packages/matplotlib/colorbar.py", line 36, in
import matplotlib.contour as contour
File "path_to_env/lib/python2.7/site-packages/matplotlib/contour.py", line 21, in
import matplotlib.font_manager as font_manager
File "path_to_env/lib/python2.7/site-packages/matplotlib/font_manager.py", line 1454, in
_rebuild()
File "path_to_env/lib/python2.7/site-packages/matplotlib/font_manager.py", line 1438, in _rebuild
json_dump(fontManager, _fmcache)
File "path_to_env/lib/python2.7/site-packages/matplotlib/font_manager.py", line 966, in json_dump
json.dump(data, fh, cls=JSONEncoder, indent=2)
File "path_to_env/lib/python2.7/json/init.py", line 190, in dump
fp.write(chunk)
IOError: [Errno 122] Disk quota exceeded
Code for reproduction
python run.py
Actual outcome
as above.
I need to clarify this only crashes when running it on a remote machine. If i tried to run it locally, it worked just fine. The remote machine should be using the same env as my local because I used SGE command '
qsub -V
' which would pass all my local environment variables to the remote machine. Also, I checked that I have enough space under /home/ and others on that remote machine.Expected outcome
quietly load in or rebuild needed fonts.
Matplotlib version
matplotlib==2.1.0
print(matplotlib.get_backend())
): TkAggpip install matplotlib
The text was updated successfully, but these errors were encountered: