Description
Using matplotlib v1.4.3 and python 2.7, importing this package when the home directory's quota has been filled causes an error when attempting to find the config directory. This is because part of the test for _is_writable_dir()
is to actually start writing to that directory.
Seems reasonable, right?
Except that this exception shouldn't be bubbling all the way out. First, the entire point of the write-check was for google app engine which was reporting the home directory as writable, but not really. The code is supposed to fall back and find another location. I suspect that the error handling is too strict or something else is amiss.
Besides that, though. The reason why this is completely incorrect behavior is that the ultimate goal of this part of the codebase is to find the matplotlibrc file and (I think) the fontcache file. If it can't find then, then create them. In my situation, I already have the matplotlibrc and fontcache. It should not be erroring all the way out.
Not a blocker for 1.5 as this problem has existed for a long time. I just now managed to capture the traceback for it.
Relevant part of traceback included:
...
import matplotlib
File "/network/apps/miniconda/lib/python2.7/site-packages/matplotlib/__init__.py", line 1100, in <module>
rcParams = rc_params()
File "/network/apps/miniconda/lib/python2.7/site-packages/matplotlib/__init__.py", line 947, in rc_params
fname = matplotlib_fname()
File "/network/apps/miniconda/lib/python2.7/site-packages/matplotlib/__init__.py", line 768, in matplotlib_fname
configdir = _get_configdir()
File "/network/apps/miniconda/lib/python2.7/site-packages/matplotlib/__init__.py", line 635, in _get_configdir
return _get_config_or_cache_dir(_get_xdg_config_dir())
File "/network/apps/miniconda/lib/python2.7/site-packages/matplotlib/__init__.py", line 602, in _get_config_or_cache_dir
if _is_writable_dir(p):
File "/network/apps/miniconda/lib/python2.7/site-packages/matplotlib/__init__.py", line 242, in _is_writable_dir
t.close()
IOError: [Errno 122] Disk quota exceeded