retorquere / zotero-better-bibtex

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

Error while exporting collection to Zotero-RDF #2336

Closed Prometheos2 closed 1 year ago

Prometheos2 commented 1 year ago

Hello,

I've got errors trying to export some of my collections to Zotero RDF files while BBT is enabled.

Debug log ID:

It seems that it only concerns elements with the connector's timestamps (2013-07-11T07:00:00.000Z), as one of my collections without one is exported without error.

There are some errors given in the debug logs, which seem to imply it's from Zotero or one of the files (?):

[JavaScript Error: "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.initWithPath]" {file: "chrome://zotero/content/xpcom/file.js" line: 47}]
[JavaScript Error: "Error: Unexpected path value 'undefined'" {file: "chrome://zotero/content/xpcom/file.js" line: 56}]
[JavaScript Error: "value must be defined in Zotero.RDF.addStatement" {file: "chrome://zotero/content/xpcom/translate/src/translation/translate.js" line: 2995}]
[JavaScript Error: "value must be defined in Zotero.RDF.addStatement" {file: "chrome://zotero/content/xpcom/translate/src/translation/translate.js" line: 2995}]
[JavaScript Error: "XML Parsing Error: no root element found
Location: http://s3.eu-central-1.amazonaws.com/ping
Line Number 1, Column 1:" {file: "http://s3.eu-central-1.amazonaws.com/ping" line: 1}]
[JavaScript Error: "XML Parsing Error: no root element found
Location: http://s3.ap-southeast-1.amazonaws.com/ping
Line Number 1, Column 1:" {file: "http://s3.ap-southeast-1.amazonaws.com/ping" line: 1}]
[JavaScript Error: "value must be defined in Zotero.RDF.addStatement" {file: "chrome://zotero/content/xpcom/translate/src/translation/translate.js" line: 2995}]
[JavaScript Error: "value must be defined in Zotero.RDF.addStatement" {file: "chrome://zotero/content/xpcom/translate/src/translation/translate.js" line: 2995}]

Thank you for your attention

Prometheos2 commented 1 year ago

and I just noticed #2315, let me try that.

Edit: Nope, it wasn't the cache

G52R6DHP-euc

retorquere commented 1 year ago

And this is reliably tied to whether BBT is active? I don't interfere in any way with RDF exports, so I have no idea how to begin to address this.

it only concerns elements with the connector's timestamps

I don't know what this means.

Prometheos2 commented 1 year ago

Yes, it errors out when BBT is active, and works properly when it's not. I was able to find the faulty elements for the first collection: TJNGAX34-euc (5JTKWIF4-euc includes three of them).

It seems it might be due to titles and author names with special characters and the "timestamps"

I don't know what this means.

Oops, sorry about that.

It's the time of the last update/publication, appending to the date. Like this: 2013-07-11T07:00:00.000Z

retorquere commented 1 year ago

Can you select one or more of the items that exhibit this behavior, right-click, and send a debug log from the BBT submenu? The ID will have -refs- in it.

Prometheos2 commented 1 year ago

Here F8D5896L-refs-euc

retorquere commented 1 year ago

I cannot reproduce the problem using F8D5896L-refs-euc, can you try disabling all 3rd party plugins except BBT, restart Zotero, and try again?

retorquere commented 1 year ago

I have tried on Windows and on MacOS, both export these 3 items without issue to Zotero RDF.

Prometheos2 commented 1 year ago

I've disabled everything else, and there is still an error: 7JKPK8PV-refs-euc

retorquere commented 1 year ago

Can you drop this Zotero RDF.js into your translators dir, restart Zotero, reproduce the problem, and send a new log?

Prometheos2 commented 1 year ago

Sadly, I will be stuck on Ubuntu until tomorrow; I will try on Windows tomorrow, hopefully in the morning.

I was able to reproduce the problem, and I tried this translator, but it didn't work: WD5FKTAR-refs-euc

retorquere commented 1 year ago

It wasn't expected to work, just give me more debug info. Can you try the new version I just published at the previous URL? I don't see any extra logging.

Prometheos2 commented 1 year ago

Weird; I probably didn't install it properly

This one should be good to go: A56UAGGQ-refs-euc

github-actions[bot] commented 1 year ago

:robot: this is your friendly neighborhood build bot announcing test build 6.7.42.3534 ("don't leave null properties on serialized object")

Install in Zotero by downloading test build 6.7.42.3534, 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 1 year ago

please try build 3534

Prometheos2 commented 1 year ago

Still erroring out: ICPASXML-refs-euc

[JavaScript Error: "value must be defined in Zotero.RDF.addStatement" {file: "chrome://zotero/content/xpcom/translate/src/translation/translate.js" line: 2995}]
[JavaScript Error: "value must be defined in Zotero.RDF.addStatement" {file: "chrome://zotero/content/xpcom/translate/src/translation/translate.js" line: 2995}]
retorquere commented 1 year ago

All of these items have at least one single-part name. Can you test what happens for one item if you switch that name to two-part?

github-actions[bot] commented 1 year ago

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

Install in Zotero by downloading test build 6.7.42.3539, 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 1 year ago

Can you test 3539?

Prometheos2 commented 1 year ago

Both of those solutions work Thank you very much!

Still, what a weird bug ^^'

I wish you happy holidays

github-actions[bot] commented 1 year ago

Thanks for the feedback; there's no way you could have known, but @retorquere prefers to keep bugreports/enhancements open as a reminder to merge the changes into a new release.

retorquere commented 1 year ago

The change to two-part names wasn't intended to be a solution, just a diagnosis. The new build is the solution. Thanks for reporting this, I'll roll it out in a new release.