mgmeyers / obsidian-zotero-integration

Insert and import citations, bibliographies, notes, and PDF annotations from Zotero into Obsidian.
GNU General Public License v3.0
1.09k stars 55 forks source link

Renaming PDFs via Zotero breaks import #371

Open putzwasser opened 5 months ago

putzwasser commented 5 months ago

I renamed a PDF that is attached to an entry. I used Zotero for that.

  1. I created a bib entry and added the PDF as attachements CiteKey: christensenCM2008InnovatorDilemma PDF File: my/vault/Zotero-Database/storage/9HY2E3R9/Christensen - 2008 - The innovator's dilemma when new technologies cau.pdf
  2. I imported the first set of annotations
  3. Then selected the bib entry in zotero
  4. Right-clicked to open the context menu and selected Manage Attachments > Rename and Move CiteKey: christensenCM2008InnovatorDilemma PDF File: my/vault/Zotero-Database/storage/9HY2E3R9/Christensen_2008_The Innovator's Dilemma.pdf

Zotero renamed the file. I can still open the PDF from Zotero without issues.

But I can't import the annotations anymore. It seems that obsidian-zotero-integration uses some kind of cache. It still uses the old file path, which of course doesn't exist anymore.

Obsidian log

Command failed with exit code 1: /my/vault/.obsidian/plugins/obsidian-zotero-desktop-connector/pdfannots2json-linux-x64 /my/vault/Zotero-Database/storage/9HY2E3R9/Christensen - 2008 - The innovator's dilemma when new technologies cau.pdf -n @christensenCM2008InnovatorDilemma-image -d 120 -f jpg -o /my/vault/Literature-Notes/christensenCM2008InnovatorDilemma -q 90
open /my/vault/Zotero-Database/storage/9HY2E3R9/Christensen - 2008 - The innovator's dilemma when new technologies cau.pdf: no such file or directory
    at $i (plugin:obsidian-zotero-desktop-connector:51:57)
    at eval (plugin:obsidian-zotero-desktop-connector:52:1356)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async yp (plugin:obsidian-zotero-desktop-connector:109:1096)
    at async Ep (plugin:obsidian-zotero-desktop-connector:112:3249)
    at async Object.callback (plugin:obsidian-zotero-desktop-connector:118:313955)
yp @ plugin:obsidian-zotero-desktop-connector:109
app.js

Things I tried