Ticket #12323 (closed enhancement: fixed)
make docbuild cache corruption error message usable
|Reported by:||was||Owned by:||mvngu|
|Report Upstream:||N/A||Reviewers:||John Palmieri, William Stein|
|Authors:||William Stein, John Palmieri||Merged in:||sage-5.0.beta1|
Description (last modified by jhpalmieri) (diff)
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 trac_12323-pedantic_version.2.patch to the main Sage library.
- Reviewers changed from wstein to John Palmieri, William Stein
- Authors set to William Stein, John Palmieri