On 2014-11-05 16:16, Nicolas M. Thiéry wrote:
For the record, my students got this error a couple times, on a
relatively recent Ubuntu, with Sage 6.3, probably recompiled on site.
Usually, this is due to Sage dying brutally (typically when they close
the terminal where they launched the notebook). Removing the corrupted
empty "users.pickle" file does the job to recover. But this is annoying,
and beyond their technical skill if this happens when I am not arount.
How does the "users.pickle" file end up empty in the first place? It
seems the file is written using
def _save(self, obj, filename):
s = cPickle.dumps(obj)
if len(s)==0:
raise ValueError("Invalid Pickle")
with open(self._abspath(filename), 'w') as f:
f.write(s)
which shouldn't write empty files. Two possibilities I see is filesystem
corruption or a write error (e.g. no space left on device).
To avoid corruption, it would be a *very good idea* to use
atomic_write() from src/sage/misc/temporary_file.py for this.
I guess that users.pickle is a very important file for the functioning
of the Notebook and it's scary to know that it's written in such an
unsafe way.
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.