keepnote icon indicating copy to clipboard operation
keepnote copied to clipboard

Notebook no longer opens after system crash or forced reboot

Open GoogleCodeExporter opened this issue 10 years ago • 1 comments

After OS crash or unexpected reboot/forced logoff, previously open notebooks 
and/or Keepnote program can no longer be opened again.  This has happened while 
running Windows 7 and Linux, but with different resulting errors.

Keepnote was running with open notebook when Windows 7 OS crashed due to power 
failure.  Keepnote program no longer runs at all after this.  

Keepnote was running with notebook open when Linux (Peppermint OS 3) 
unexpectedly crashed.  Keepnote program will run and I can create a new 
notebook, but I can no longer open the original notebook that was open during 
the crash.

Error log for Windows installation:

KeepNote 0.7.8: Fri Jun 14 14:43:17 2013
Traceback (most recent call last):
  File "keepnote", line 437, in <module>
  File "keepnote", line 423, in main
  File "keepnote", line 271, in start_gui
  File "keepnote\gui\__init__.pyc", line 441, in init
  File "keepnote\__init__.pyc", line 756, in init
  File "keepnote\__init__.pyc", line 652, in read
KeepNotePreferenceError: not well-formed (invalid token): line 97, column 0
Cannot read preferences


Error log for Linux installation:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/keepnote/gui/__init__.py", line 568, in func
    notebook.load(filename, conn)
  File "/usr/lib/python2.7/dist-packages/keepnote/notebook/__init__.py", line 1411, in load
    self._read_attr_defs()
  File "/usr/lib/python2.7/dist-packages/keepnote/notebook/__init__.py", line 1332, in _read_attr_defs
    self.attr_defs.parse(self._attr.get("attr_defs", ()))
  File "/usr/lib/python2.7/dist-packages/keepnote/notebook/__init__.py", line 451, in parse
    self.add(parse_attr_def(item))
  File "/usr/lib/python2.7/dist-packages/keepnote/notebook/__init__.py", line 464, in parse_attr_def
    return AttrDef(attr_def_dict["key"],
KeyError: 'key'


Original issue reported on code.google.com by [email protected] on 14 Jun 2013 at 8:01

GoogleCodeExporter avatar Mar 15 '15 04:03 GoogleCodeExporter

I am not sure if you solved it already but to save other people's future 
headache, I'll do some necroing.

Delete the keepnote preference file and restart KeepNote. The application will 
create a new, clean one.

Default preference file location (Windows): %APPDATA%\keepnote\keepnote.xml


Everytime KeepNote refuses to start or load a notebook, removing or replacing a 
corrupt .xml file solves the problem (notebook.nbk and the root node.xml are 
the usual culprits).
Since I usually don't shut down my system safely and also have a notebook 
encrypted inside a TrueCrypt volume, I encounter these .xml errors a lot. So I 
always keep a well-formed notebook.nbk and node.xml files somewhere on my hard 
drive wchich allows me to just switch them with the corrupted ones anytime the 
error occurs.

Original comment by [email protected] on 4 Jan 2014 at 1:58

GoogleCodeExporter avatar Mar 15 '15 04:03 GoogleCodeExporter