Zotero 10: item.export JSON-RPC fails with "could not find library" when library is a string/name
Debug log ID
WTNEKYKG-euc/✓/✓
What happened?
On Zotero 10.0.1 with Better BibTeX 9.0.59.0080, the JSON-RPC method
item.export fails with "could not find library …" whenever the library
argument is passed as a STRING ("1") or as the library NAME ("我的文库" /
"My Library"). It only succeeds when library is a numeric libraryID (1).
This breaks the Obsidian Zotero Integration plugin (v3.2.1), which passes the library through from the selected-item flow: the plugin writes the note file with the correct citekey filename but with 0 bytes of content, and surfaces no error.
Direct JSON-RPC reproduction (http://127.0.0.1:23119/better-bibtex/json-rpc):
- item.citationkey params [["1:ZM92W5UT"]] → works (returns citekey)
- item.export params [["zakiMeasuringPolicyLearning2024"], "36a3b0b5-bad0-4a04-b79b-441c7cef77db", 1] → works (numeric libraryID, returns full item data)
- item.export params [["zakiMeasuringPolicyLearning2024"], "36a3b0b5-bad0-4a04-b79b-441c7cef77db", "1"] → error "could not find library 1" (string libraryID)
- item.export params [["zakiMeasuringPolicyLearning2024"], "36a3b0b5-bad0-4a04-b79b-441c7cef77db", "我的文库"] → error "could not find library 我的文库" (library name)
item.search was already fixed by 9.0.59.0080 (issue #3587), but item.export still has this library-type problem.
Expected: item.export should accept a string/name library identifier (as it did before Zotero 10), or consistently expose the numeric libraryID, so the Obsidian import produces non-empty notes.
Source: retorquere/zotero-better-bibtex