renerocksai / sublimeless_zk

A note taking app, Markdown editor, and text browser, featuring ID based wiki style links, and #tags, intended for zettelkasten method users. Loaded with tons of features like sophisticated tag search, note transclusion, support for note templates, bibliography support, etc. to make working in your Zettelkasten a joy 😄
GNU General Public License v3.0
197 stars 24 forks source link

slzk doesn't start if a file from a previous session is removed from disk #78

Closed 517qf closed 6 years ago

517qf commented 6 years ago

slzk doesn't seem to start if I remove a file from outside slzk (i.e. my file manager) that is in the current session. If you use only slzk that shouldn't happen but some people have strange ideas ...

I get this error message in the console (ubuntu 1804):

bibfile not found: /path/to/zotero.bib
Traceback (most recent call last):
  File "/home/user/sublimeless_zk/src/sublimeless_zk.py", line 2014, in <module>
    Sublimeless_Zk().run()
  File "/home/user/sublimeless_zk/src/sublimeless_zk.py", line 544, in run
    self.open_folder(self.app_state.recent_projects[-1])
  File "/home/user/sublimeless_zk/src/sublimeless_zk.py", line 712, in open_folder
    self.reopen_notes()
  File "/home/user/sublimeless_zk/src/sublimeless_zk.py", line 736, in reopen_notes
    self.open_document(filn)
  File "/home/user/sublimeless_zk/src/sublimeless_zk.py", line 773, in open_document
    editor = self.gui.new_zk_editor(document_filn, settings = self.project.settings)
  File "/home/user/sublimeless_zk/src/mainwindow.py", line 81, in new_zk_editor
    mode='r', encoding='utf-8', errors='ignore') as f:
FileNotFoundError: [Errno 2] Datei oder Verzeichnis nicht gefunden: "/home/user/zettelkasten/20170726031957 Paradoxes3.md"
renerocksai commented 6 years ago

:+1: yeah, it's probably in the new appstate. if you remove that file carefully from the json, it will start again. i'll add more checks . also, if the file (history function) is a note or some arbitrary markdown file or some theme.json...