argenos / zotero-mdnotes

A Zotero plugin to export item metadata and notes as markdown files
https://argenos.github.io/zotero-mdnotes/
GNU General Public License v3.0
1.34k stars 81 forks source link

'Export to markdown' on extracted annotations not working #149

Closed DitDotz closed 3 weeks ago

DitDotz commented 2 years ago

Describe the bug 'Export to markdown' on extracted annotations not working.

To Reproduce Steps to reproduce the behavior:

  1. Clicked 'Export to markdown' on extracted annotations

  2. See error in debug output logging: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data noteToMarkdown@chrome://mdnotes/content/mdnotes.js:362:14 getZoteroNoteFileContents@chrome://mdnotes/content/mdnotes.js:733:14 exportToMarkdownMenu@chrome://mdnotes/content/mdnotes.js:1030:26

Expected behavior To have extracted annotations converted to markdown file at specified location

Desktop (please complete the following information):

FeralFlora commented 2 years ago

I am experiencing the same bug using Zotero beta 6.0.9-beta.6+b215d93ac.

Longyichen commented 1 year ago

yes,same bug in zotero 6.0.23 + mdnotes 0.2.3

wuc9521 commented 1 year ago

exactly same problem

hajdukste commented 3 months ago

What error are you getting? In Zotero, you can enable debug logging by going to Help -> Debug Output Logging -> Enable and View Output, and then performing the export. I was encountering an error that Zotero.MarkdownUtils was not defined. This was because I had packaged the source code into an xpi file myself, which has mdnotes.js and markdown-utils.js in different folders.

If I use the original xpi file, I can export the annotations. When I examined how the xpi file was packaged by renaming it to zip, I noticed that these two files were actually in the same folder, so I think that is the reason for the error.

I am using Zotero 6.0.37 with mdnotes 0.2.3.