deanishe / zothero

Rapidly search and cite Zotero entries from Alfred
MIT License
480 stars 31 forks source link

Unable to copy citations #37

Closed bibekpokharel closed 4 years ago

bibekpokharel commented 4 years ago

Thank you for this very useful workflow!

The script generally works but when copying citations there seems to be some issue. I have tried using different styles and the problem persists. When I copy a citation this is what I get as a result zotero://select/items/1_MEPFRUEK I am also attaching the portion of the log file when this error occurred. I am using Catalina 10.15.4 with Alfred Version 4.0.9.

22:45:49 core.py:197 INFO     [core] searching for "o" ...
22:45:49 index.py:245 INFO     [index] 110 result(s) for u'o'
22:45:53 workflow.py:2080 ERROR    database is locked
Traceback (most recent call last):
  File "./lib/workflow/workflow.py", line 2073, in run
    func(self)
  File "./zh", line 714, in main
    return do_reindex()
  File "./zh", line 597, in do_reindex
    app.update_index(force=False)
  File "./lib/zothero/core.py", line 166, in update_index
    self.index.update(self.zotero, force)
  File "./lib/zothero/index.py", line 282, in update
    self._update(zot, True)
  File "./lib/zothero/index.py", line 325, in _update
    for e in it:
  File "./lib/zothero/zotero.py", line 268, in all_entries
    yield self._load_entry(row)
  File "./lib/zothero/zotero.py", line 320, in _load_entry
    e.citekey = self.bbt.citekey('{}_{}'.format(e.library, e.key))
  File "./lib/zothero/zotero.py", line 195, in bbt
    self._bbt = BetterBibTex(self.datadir)
  File "./lib/zothero/betterbibtex.py", line 48, in __init__
    row = conn.execute(SQL).fetchone()
OperationalError: database is locked
22:45:53 workflow.py:2082 INFO     for assistance, see: https://github.com/deanishe/zothero/issues
deanishe commented 4 years ago

Duplicate of #33 (it's the same underlying issue). For now, closing and re-opening Zotero should fix it.