I’m having an issue with the Zotero Integration since a few days. This issue only comes up with my laptop (Surface Pro 6, Windows 11 Pro, V.22H2), while everything works fine with my desktop at work. In both cases, Obsidian, the Zotero Integration plugin and the better BibTex add-on in Zotero are up-to-date.
Basically, when I try importing Zotero data to create a litterature note in Obsidian, I receive the following error message:
Error retrieving item data: Unexpected end of JSON input
I have checked the console, and there are two issues:
One Syntax error:
In plugin:obsidian-zotero-desktop-connector:98
SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at nr (plugin:obsidian-zotero-desktop-connector:98:8531)
at async Ep (plugin:obsidian-zotero-desktop-connector:112:2121)
at async Object.callback (plugin:obsidian-zotero-desktop-connector:118:313955)
nr @ plugin:obsidian-zotero-desktop-connector:98
And a (in promise) TypeError:
In plugin:obsidian-zotero-desktop-connector:112
Uncaught (in promise) TypeError: Cannot read properties of null (reading ‘length’)
at Ep (plugin:obsidian-zotero-desktop-connector:112:2180)
at async Object.callback (plugin:obsidian-zotero-desktop-connector:118:313955)
What should I do?
I have tried to re-install the plugin and better BibTex, but nothing is working so far. I’m not super tech-savy so I don’t really understand these error messages.
{% macro heading(color) -%}
{%- if color == “#5fb236” -%} Main ideas and conclusions
{%- endif -%}
{%- if color == “#2ea8e5” -%} Questions
{%- endif -%}
{%- if color == “#ffd400” -%} Important
{%- endif -%}
{%- if color == “#a28ae5” -%} Definitions and concepts
{%- endif -%}
{%- if color == “#ff6666” -%} Weaknesses and caveats
{%- endif -%}
{%- if color == “#e56eee” -%} Background
{%- endif -%}
{%- if color == “#f19837” -%} Method
{%- endif -%}
{%- if color == “#aaaaaa” -%} To research further
{%- endif -%}
{%- endmacro -%}
{% macro calloutCharacter(color) -%}
{%- if color == “#5fb236” -%}
$
{%- endif -%}
{%- if color == “#2ea8e5” -%}
@
{%- endif -%}
{%- if color == “#ffd400” -%}
&
{%- endif -%}
{%- if color == “#a28ae5” -%}
~
{%- endif -%}
{%- if color == “#ff6666” -%}
!
{%- endif -%}
{%- if color == “#e56eee” -%}
€
{%- endif -%}
{%- if color == “#f19837” -%}
?
{%- endif -%}
{%- if color == “#aaaaaa” -%}
%
{%- endif -%}
{%- endmacro -%}
{% persist “annotations” %}
{% set annotations = annotations | filterby(“date”, “dateafter”, lastImportDate) -%}
{% if annotations.length > 0 %} Imported on {{importDate | format(“YYYY-MM-DD HH:mm”)}}
{% for color, annotations in annotations | groupby(“color”) -%}
{{calloutCharacter(annotation.color)}} {{annotation.annotatedText | nl2br}} (p. {{annotation.pageLabel}})](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.pageLabel}}&annotation={{annotation.id}}) {% if annotation.hashTags %}{{annotation.hashTags}}{% endif %}
%had to break this last link to post%
{%- endif -%}{%- endfor %}