drkane / datasette-reconcile

Adds a reconciliation API endpoint to Datasette, based on the Reconciliation Service API specification.
MIT License
22 stars 6 forks source link

Problem to use the plugin #13

Closed JBPressac closed 3 years ago

JBPressac commented 3 years ago

Hello, Thank you for your plugin. I successfully installed the plugin with Datasette 0.55 and modified the metadata.json file to add a reconcilation service on one table.

The /-/reconcile URL returns:

{
  "versions": [
    "0.1",
    "0.2"
  ],
  "name": "PRELIB Personnes reconciliation",
  "identifierSpace": "http://rdf.freebase.com/ns/type.object.id",
  "schemaSpace": "http://rdf.freebase.com/ns/type.object.id",
  "defaultTypes": "personne",
  "view": "/prelib/prelib_personne/{{id}}"
}

And /-/reconcile?queries={"q1":{"query":"Christophe"},"q2":{"query": "Hers"}} successfully returns candidates.

However, when I try to add the service in OpenRefine (Reconcile > Start reconciling > Add Standard Service and add the /-/reconcile URL), OpenRefine displays an error message: Error contacting recon service: parsererror : Error: jQuery111105708109859784188_1614767957684 was not called -

Do you have any suggestions to solve the problem ?

Thank you,

drkane commented 3 years ago

Hi @JBPressac thanks for the issue. Do you know what version of OpenRefine you're using? At the moment the plugin doesn't support the JSONP method for reconciliation (which is what's causing the error message).

OpenRefine versions 3.3+ should support the CORS method which should work - it could be you need to upgrade to a later version of OpenRefine (if this doesn't work then let me know - it could be we're not supporting CORS queries either).

I should probably add something to the readme to make it clear that you need a later version of OpenRefine.

drkane commented 3 years ago

Actually - I've just realised that even even you're using the latest version of OpenRefine it might not work. I've now added CORS support which should help - OpenRefine will need to be >3.3 though - you'll need to update the module: https://pypi.org/project/datasette-reconcile/

(see issue #10)

JBPressac commented 3 years ago

Indeed, I realized afterwards that it had to be CORS. Thank you for your speed in correcting the problem!