retorquere / zotero-better-bibtex

Make Zotero effective for us LaTeX holdouts
https://retorque.re/zotero-better-bibtex/
MIT License
5.29k stars 284 forks source link

Issue with CAYW scannable-cite format export #2007

Closed rlasse closed 2 years ago

rlasse commented 2 years ago

Hi,

I am experiencing an issue with pulling scannable-cite citations through CAYW. I have been using zotpick's scripts to open BBT to Scrivener both by using davepwsmith's app and by making my own automation service. (https://github.com/davepwsmith/zotpick-applescript/blob/master/zotpick-scannable-cite.applescript) The CAYW UI opens without any issues and I'm able to pick Zotero items. But in every case, BBT exports the following message instead of exporting the scannable-cite citation: "CAYW failed: TypeError: item.uri is undefined Scannable-cite@chrome://zotero-better-bibtex/content/better-bibtex.js:81160:15"

Every other format query seems to work just fine (pandoc, mmd, ...), so I'm guessing this is an issue with the scannable-cite format?

Below I attached a debug log. I would very much appreciate your help!

What I tried: -accessing the CAYW through terminal (same outcome) -reinstalling BBT and zotpick scripts (same outcome) -clearing Zotero cache (no effect)


Application: Zotero 5.0.97-beta.59+abe8c39c5 en-US Platform: MacIntel Intel Mac OS X 10.16

87XAHELY-euc.zip

github-actions[bot] commented 2 years ago

:robot: this is your friendly neighborhood build bot announcing test build 6.1.0.1904 ("logging for #2007")

Install in Zotero by downloading test build 6.1.0.1904, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

retorquere commented 2 years ago

Can you install 1904, do that again, and send a new log?

rlasse commented 2 years ago

Just updated to 1904, the issue is still present unfortunately. Here is the log. SUH5RA6U-euc.zip

retorquere commented 2 years ago

I know it's still present, this just adds logging.

Is the reporting facility not working properly for you? If you click submit you ought to see the ID presented in red, that will give me the logs. The zip files work, but I have tools that pick up the log based on the id, and those make it easier to create test cases when needed. Not wholly relevant to your case, as I don't expect I will need to add a testcase for this, but if the reporting is broken I'd need to fix it.

rlasse commented 2 years ago

Oh very sorry about that. I was able to submit it now, it was greyed out before. ID: DZHAPAVG-euc

retorquere commented 2 years ago

strange

github-actions[bot] commented 2 years ago

:robot: this is your friendly neighborhood build bot announcing test build 6.1.0.1906 ("fixes #2007")

Install in Zotero by downloading test build 6.1.0.1906, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

retorquere commented 2 years ago

Can you try 1906?

rlasse commented 2 years ago

Just did that. There is still an error but the error message changed: CAYW failed: Error: No formatted citation found for zu:0:QPJVRHFM scannable-cite@chrome://zotero-better-bibtex/content/better-bibtex.js:81168:17

I tried it with multiple different entries as well. I reshared a log: 6TXF2E5L-euc.

github-actions[bot] commented 2 years ago

:robot: this is your friendly neighborhood build bot announcing test build 6.1.0.1908 ("log retrieved labels")

Install in Zotero by downloading test build 6.1.0.1908, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

retorquere commented 2 years ago

can you get me a new log with 1908?

rlasse commented 2 years ago

Here you go. Error message: CAYW failed: Error: No formatted citation found for “zu:0:QPJVRHFM” in [“zu:6371466:QPJVRHFM”] scannable-cite@chrome://zotero-better-bibtex/content/better-bibtex.js:81168:17

Log ID: XNZQ3SJV-euc

github-actions[bot] commented 2 years ago

:robot: this is your friendly neighborhood build bot announcing test build 6.1.0.1909 ("remove odf-scan dependency")

Install in Zotero by downloading test build 6.1.0.1909, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

retorquere commented 2 years ago

build 1909 removes the dependency on the ODF-scan plugin being installed.

rlasse commented 2 years ago

Great! The export seems to work now, this is the message: { | Berry, 1975 | | | zu:0:ITEMKEY } But it seems that the item key is not being exported properly?

Log ID: GZ6FNBVE-euc

retorquere commented 2 years ago

you are running BBT in test mode. Set translators.better-bibtex.testing to false (which is the default, not sure how it got turned on for you) and you will get the key.

rlasse commented 2 years ago

Oh I see. not sure how this happened. I am getting the key now, but there is still an undefined part: { | Berry, 1975 | | | zu:6371466:undefined }

Not sure if this will affect the citation?

Log ID:N7CFKKL9-euc

rlasse commented 2 years ago

Actually, the item key that is exported is the same for every item... And I just checked, although ODF scan recognizes the citations, Zotero is not able to change the format of the citation because "it is no longer in the Zotero Database."

retorquere commented 2 years ago

I need to find out why you're getting an undefined.

github-actions[bot] commented 2 years ago

:robot: this is your friendly neighborhood build bot announcing test build 6.1.0.1913 ("scannable cite uses legacu format")

Install in Zotero by downloading test build 6.1.0.1913, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

rlasse commented 2 years ago

1913 seems to have solved it. Thank you!!! Interestingly though, options such as adding page numbers are not getting exported, while this is not the case for pandoc?

github-actions[bot] commented 2 years ago

:robot: this is your friendly neighborhood build bot announcing test build 6.1.0.1915 ("include locator and stuff")

Install in Zotero by downloading test build 6.1.0.1915, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

retorquere commented 2 years ago

1915 should solve that

rlasse commented 2 years ago

yes, everything works well now! Again, thank you so much!!