mgmeyers / obsidian-zotero-integration

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

Error on note import when using template and PDF attachment exists #211

Open tannie opened 1 year ago

tannie commented 1 year ago

If I try to import a note while using a template, and the item has a PDF attachment, the note is not created. In the debugger I see the following error:

plugin:obsidian-zotero-desktop-connector:6 Uncaught (in promise) Template render error: (unknown path) [Line 1, Column 3]
  parseAggregate: expected colon after dict key
    at Object.u [as _prettifyError] (plugin:obsidian-zotero-desktop-connector:6:13035)
    at P.F.render (plugin:obsidian-zotero-desktop-connector:20:6632)
    at P.F.renderString (plugin:obsidian-zotero-desktop-connector:20:4846)
    at eval (plugin:obsidian-zotero-desktop-connector:63:18679)
    at new Promise (<anonymous>)
    at tt (plugin:obsidian-zotero-desktop-connector:63:18636)
    at eval (plugin:obsidian-zotero-desktop-connector:116:2719)
    at Generator.next (<anonymous>)
    at i (plugin:obsidian-zotero-desktop-connector:6:1250)

Notes are created if there is no PDF attachment, and when I don't use a template. My template looks like this:

{{title}}
Formatted Bibliography
{{bibliography}} {% if abstractNote %}

Abstract
{{abstractNote}} {% endif %}
tannie commented 1 year ago

I've experimented with an empty vault (it works) and have turned off all but essential plugins, and it now seems to work. I'll go turn them back on, and report back if I find which plugin was the issue (if I discover it)

tannie commented 1 year ago

Ok, even with restarting Obsidian in between activating / de-activating plugins, I had issues. I turned almost everything off, removed the 'import format'. When I re-created it, it worked. But when I renamed it, it stopped working. Renamed it back and it works again. I'm puzzled, but at least it works. Feel free to close this if there is nothing to be done, I don't want to presume there isn't any optional error-catching.

mgmeyers commented 1 year ago

@tannie Strange. Out of curiosity, what did you rename the import format to?

Atticuszz commented 4 months ago

+1

Atticuszz commented 4 months ago

reinstall the plugin , fixed it myself