zotero / translation-server

A Node.js-based server to run Zotero translators
Other
122 stars 51 forks source link

Translation error exporting csljson #56

Closed dhimmel closed 5 years ago

dhimmel commented 5 years ago

I ran the following using https://github.com/zotero/translation-server/commit/aed6c83f4d60efda3c83dd249c1843bb03fc1058:

curl --silent \
  --data 'https://www.nytimes.com/2018/06/11/technology/net-neutrality-repeal.html' \
   --header 'Content-Type: text/plain' \
  http://127.0.0.1:1969/web | \
curl --silent \
  --data @- \
  --header 'Content-Type: application/json' \
  'http://127.0.0.1:1969/export?format=csljson'

The following was returned:

An error occurred during translation. Please check translation with the Zotero client.
dhimmel commented 5 years ago

I also got the same error for ISBN metadata:

curl --silent \
  --data '9781339919881' \
  --header 'Content-Type: text/plain' \
  'http://127.0.0.1:1969/search' | \  
curl --silent \
  --data @- \
  --header 'Content-Type: application/json' \
  'http://127.0.0.1:1969/export?format=csljson'
dhimmel commented 5 years ago

Confirming this is not due to passing the zenodo JSON to curl via stdin, as the following also has the error:

curl --silent \
  --data isbn:9781339919881 \
   --header 'Content-Type: text/plain' \
  http://127.0.0.1:1969/search > zenodo-items.json

curl --silent \
  --data @zenodo-items.json \
  --header 'Content-Type: application/json' \
  'http://127.0.0.1:1969/export?format=csljson'
dhimmel commented 5 years ago

Thanks @dstillman for https://github.com/zotero/translation-server/commit/64644978d7d49ea147f1ac5f87fcbfda02eca470. Confirming that it fixes "An error occurred during translation"!