tpoisot / autocomplete-citeproc

Autocomplete references from JSON files when writing in markdown
MIT License
2 stars 2 forks source link

error: Unexpected end of of JSON input #16

Closed rriemann closed 4 years ago

rriemann commented 6 years ago

Hello,

I get the error "Unexpected end of of JSON input" if the Zotero BetterBibTex plugin (https://github.com/retorquere/zotero-better-bibtex) updates my json file.

Using the debugger, I found out that the file watcher is triggered twice:

My atom version: "1.23.1" I have all autocomplete-citeproc updates installed.

 addBibtexFile: (file) ->
    return new Promise((resolve, reject) =>
      fs.readFile(file, 'utf8').then( (content) =>

        references = JSON.parse(content)

screenshot_20180129_212640

rriemann commented 6 years ago

I am not sure if this should be better resolved upstream in https://github.com/retorquere/zotero-better-bibtex/ . @retorquere ?

retorquere commented 6 years ago

I'll see what I can do, but I don't actually export these files myself, I just schedule that Zotero does. In principle a manual export should exhibit the same problem.

tpoisot commented 5 years ago

I haven't been able to reproduce this, can you check that it's still happening with the 1.4.3 version of autocomplete-bibtex?

tpoisot commented 4 years ago

This was caused by the issued date field having a literal field, this will be fixed in the coming release.