Git Product home page Git Product logo

Comments (11)

wetneb avatar wetneb commented on June 3, 2024 2

@mvolz thanks for the pointers. I will try to get this solved today.

from openrefine-wikibase.

mvolz avatar mvolz commented on June 3, 2024 1

Same issue :). Basically any browser-side script (i.e. gadgets) on Wikidata/Wikipedia won't be able to access the service because it's blocked.

Error is:

No 'Access-Control-Allow-Origin' header is present on the requested resource.

I briefly googled and found a gist of how to enable CORS for Bottle; maybe useful? https://gist.github.com/richard-flosi/3789163

from openrefine-wikibase.

wetneb avatar wetneb commented on June 3, 2024 1

@mvolz @jaygray0919 I have deployed the fix, let me know if there are still issues on your side.

from openrefine-wikibase.

mvolz avatar mvolz commented on June 3, 2024 1

Works beautifully, thank you so much! 🥇

from openrefine-wikibase.

wetneb avatar wetneb commented on June 3, 2024

Feature request duly noted! PRs on this would be very welcome.

from openrefine-wikibase.

mvolz avatar mvolz commented on June 3, 2024

https://pypi.org/project/bottle-cors/ maybe better

from openrefine-wikibase.

mvolz avatar mvolz commented on June 3, 2024

I do get this error, but it does load :).

load.php?debug=false&lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|mw.config.values.wbSiteDetails|oojs-ui.styles.icons-editing-advanced&skin=vector&version=1w1t5tj:130 [Report Only] Refused to connect to 'https://tools.wmflabs.org/openrefine-wikidata/en/api?query=%7B%22query%22%3A%22PLoS%20Computational%20Biology%22%2C%22limit%22%3A1%2C%22type%22%3Anull%2C%22type_strict%22%3A%22any%22%7D' because it violates the following Content Security Policy directive: "default-src 'self' data: blob: upload.wikimedia.org https://commons.wikimedia.org meta.wikimedia.org *.wikimedia.org *.wikipedia.org *.wikinews.org *.wiktionary.org *.wikibooks.org *.wikiversity.org *.wikisource.org wikisource.org *.wikiquote.org *.wikidata.org *.wikivoyage.org *.mediawiki.org wikimedia.org". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback

from openrefine-wikibase.

wetneb avatar wetneb commented on June 3, 2024

@mvolz interesting… I don't know much about CORS so correct me if I am wrong but it seems that the problem comes from a policy from the source website (mediawiki) rather than from the behaviour of the reconciliation service itself?

from openrefine-wikibase.

mvolz avatar mvolz commented on June 3, 2024

Me neither, who knows! Probably a problem on my end.

from openrefine-wikibase.

jaygray0919 avatar jaygray0919 commented on June 3, 2024

we're seeing:
XHR status: 200
XHR status text: OK
XHR exposed response headers:
content-type: application/json

will test with more data later
thanks for the progress

from openrefine-wikibase.

mvolz avatar mvolz commented on June 3, 2024

For some reason the access header isn't there for error messages.

Not a big deal as it's not like it's supposed to give you data anyway, but inconsistent I guess.

Example url with error that causes it: https://tools.wmflabs.org/openrefine-wikidata/en/api?query=%2210.1371%2Fjournal.pcbi.1002947%22

from openrefine-wikibase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.