#12323: make docbuild cache corruption error message usable
-----------------------------+----------------------------------------------
Reporter: was | Owner: mvngu
Type: enhancement | Status: new
Priority: minor | Milestone: sage-5.0
Component: documentation | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
-----------------------------+----------------------------------------------
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.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12323>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.