could not parse response body as JSON SyntaxError: Unexpected token 'p', "page
http"... is not valid JSON
at JSON.parse (<anonymous>)
at handleResponse (file:///opt/homebrew/lib/node_modules/wikibase-cli/lib/request.js:48:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { body: 'page\r\nhttps://id.wikipedia.org/wiki/Gubernur_Aceh\r\n' }
page
https://id.wikipedia.org/wiki/Gubernur_Aceh
(FWIW: The Unexpected token 'p' seems to vary based on the first column name: if this was 'SELECT ?item, ?page' then it gets: Unexpected token 'i', "item,page)
Since updating to v18,
wd sparql -f csv
is warning about JSON SyntaxErrors.For example, given a sparql.js of:
then
wd sparql -f csv sparql.js
gives:(FWIW: The
Unexpected token 'p'
seems to vary based on the first column name: if this was 'SELECT ?item, ?page' then it gets:Unexpected token 'i', "item,page
)