id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	work_issues	upstream	reviewer	author	merged	dependencies	stopgaps
12323	make docbuild cache corruption error message usable	was	mvngu	"I ran into this, perhaps due to hitting control-c at the wrong moment:
{{{
deep:d wstein$ sage -docbuild en/reference html
Traceback (most recent call last):
  File ""/Users/wstein/sage/install/sage-5.0.beta1/devel/sage/doc/common/builder.py"", line 1060, in <module>
    getattr(get_builder(name), type)()
  File ""/Users/wstein/sage/install/sage-5.0.beta1/devel/sage/doc/common/builder.py"", line 332, in _wrapper
    inherit_prev = self.get_cache().get('option_inherited')
  File ""cachefunc.pyx"", line 1397, in sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (sage/misc/cachefunc.c:7026)
  File ""/Users/wstein/sage/install/sage-5.0.beta1/devel/sage/doc/common/builder.py"", line 383, in get_cache
    cache = cPickle.load(file)
EOFError
}}}

It took a fair bit of cleverness to figure out what file I had to delete in order to get back to work.  Instead, we should use {{{try: except}}} and if the load fails, print the file name and suggest that the user delete it and try again.   This will be easy to implement and save people time and frustration.  Since building documentation takes a long time, it is probably not that uncommon for people to control-c out of it, perhaps at the ""wrong"" moment.  

We could also harden writing the cache file, so that it is more difficult to corrupt.  But at a bare minimum, making a better error message has to be done. 

----------

Apply [attachment:trac_12323-pedantic_version.2.patch] to the main Sage library."	enhancement	closed	minor	sage-5.0	documentation	fixed				N/A	John Palmieri, William Stein	William Stein, John Palmieri	sage-5.0.beta1		
