wshanks / lyz

LyZ is a plugin for Zotero, which is intended to make working with LyX/Zotero more pleasant.
GNU General Public License v3.0
108 stars 13 forks source link

Writing Empty .bib files (Microsoft) #34

Open NautilusNow opened 4 years ago

NautilusNow commented 4 years ago

my Lyz extension allows the creation of the .bib files but they are totally empty. Sometimes when i click on "cite in lyx" absolutely nothing happens as well. Zotero is telling me the error is: [JavaScript Error: "TypeError: ckre.exec(...) is null" {file: "chrome://lyz/content/lyz.js" line: 632}]

I am using Zotero 5.0.87 and the latest stable release of lyz.

Please help?

wshanks commented 4 years ago

Strange, I will try to see if I can reproduce this. Did LyZ work with you in the past?

NautilusNow commented 4 years ago

Thank you. No, this is my first time trying to use Lyz.

wshanks commented 4 years ago

Hmm, looking at the code, the error message indicates that the regular expression did not find a match on the text produced when translating the item. Did you change the selected translator to something other than BibTeX in the settings menu? The regular expression is looking for an @ followed by some text, followed by a {, followed by some text (which it takes to be the cite key), and then a ,. There is no error handling for the case where this regular expression doesn't match.

You can right click the item, choose "Export item..." and export the item to a file to see what the text looks like for a given translator.

NautilusNow commented 4 years ago

OK so it's working now. I tried exporting it like you said and that made me realise where I was going wrong. It was a stupid error on my part. Basically I was pressing the arrow beside the Zotero library catalogue of each reference and right-clicking on the PDF contained inside to select "cite in Lyx". Once I just select the zotero reference and try it again I have no issues and my .bib file is populated. Thanks for your assistance in this matter.

wshanks commented 4 years ago

I'm glad you figured it out. I created #35 as a follow up issue for the unhelpful error message you saw.