Error 403 when import nuts
Module
base_location_nuts, l10n_es_location_nuts
Describe the bug
Not possible to download NUTS due a 403 raise error.
To Reproduce
Contacts --> Configuration --> Import NUTS 2024
Steps to reproduce the behavior: 1. 2. 3.
Expected behavior Download the NUTS registers.
Additional context Pasted the whole error.
Traceback (most recent call last): File "/opt/odoo/odoo-server/odoo/http.py", line 1658, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo/odoo-server/odoo/service/model.py", line 133, in retrying result = func() ^^^^^^ File "/opt/odoo/odoo-server/odoo/http.py", line 1686, in _serve_ir_http response = self.dispatcher.dispatch(rule.endpoint, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo/odoo-server/odoo/http.py", line 1890, in dispatch result = self.request.registry['ir.http']._dispatch(endpoint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo/odoo-server/addons/website/models/ir_http.py", line 237, in _dispatch response = super()._dispatch(endpoint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 154, in _dispatch result = endpoint(**request.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo/odoo-server/odoo/http.py", line 734, in route_wrapper result = endpoint(self, *args, **params_ok) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo/odoo-server/addons/web/controllers/dataset.py", line 46, in call_button action = self._call_kw(model, method, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo/odoo-server/addons/web/controllers/dataset.py", line 33, in _call_kw return call_kw(request.env[model], method, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo/odoo-server/odoo/api.py", line 468, in call_kw result = _call_kw_multi(method, model, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo/odoo-server/odoo/api.py", line 453, in _call_kw_multi result = method(recs, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo/custom-addons/base_location_nuts/wizard/nuts_import.py", line 225, in action_partner_nuts nuts_ids = self.import_update_partner_nuts() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/odoo/custom-addons/base_location_nuts/wizard/nuts_import.py", line 220, in import_update_partner_nuts raise error File "/opt/odoo/custom-addons/base_location_nuts/wizard/nuts_import.py", line 213, in import_update_partner_nuts response.raise_for_status() File "/opt/odoo/odoo-server/odoo-venv/lib/python3.12/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://publications.europa.eu/webapi/rdf/sparql?format=json&query=%0A++++++++++++PREFIX+%3A+%3Chttp%3A%2F%2Fdata.europa.eu%2Fnuts%2F%3E%0A++++++++++++PREFIX+adms%3A+%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Fadms%23%3E%0A++++++++++++PREFIX+corrStatus%3A+%3Chttp%3A%2F%2Fpublications.europa.eu%2Fresource%2Fauthority%2Fcorrection-status%2F%3E%0A++++++++++++PREFIX+cpsv%3A+%3Chttp%3A%2F%2Fpurl.org%2Fvocab%2Fcpsv%23%3E%0A++++++++++++PREFIX+cv%3A+%3Chttp%3A%2F%2Fdata.europa.eu%2Fm8g%2F%3E%0A++++++++++++PREFIX+dataTypeDefinitions%3A+%3Chttp%3A%2F%2Fpublications.europa.eu%2Fontology%2Feuvoc%2FdataTypeDefinitions%23%3E%0A++++++++++++PREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0A++++++++++++PREFIX+dcat%3A+%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Fdcat%23%3E%0A++++++++++++PREFIX+dct%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0A++++++++++++PREFIX+eli%3A+%3Chttp%3A%2F%2Fdata.europa.eu%2Feli%2Fontology%23%3E%0A++++++++++++PREFIX+euvoc%3A+%3Chttp%3A%2F%2Fpublications.europa.eu%2Fontology%2Feuvoc%23%3E%0A++++++++++++PREFIX+externalImports%3A+%3Chttp%3A%2F%2Fpublications.europa.eu%2Fontology%2Feuvoc%2FexternalImports%23%3E%0A++++++++++++PREFIX+fn%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2005%2Fxpath-functions%23%3E%0A++++++++++++PREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0A++++++++++++PREFIX+geosparql%3A+%3Chttp%3A%2F%2Fwww.opengis.net%2Font%2Fgeosparql%23%3E%0A++++++++++++PREFIX+gml%3A+%3Chttp%3A%2F%2Fwww.opengis.net%2Font%2Fgml%23%3E%0A++++++++++++PREFIX+gn%3A+%3Chttp%3A%2F%2Fwww.geonames.org%2Fontology%23%3E%0A++++++++++++PREFIX+grddl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2003%2Fg%2Fdata-view%23%3E%0A++++++++++++PREFIX+internalImports%3A+%3Chttp%3A%2F%2Fpublications.europa.eu%2Fontology%2Feuvoc%2FinternalImports%23%3E%0A++++++++++++PREFIX+legalDescriptions%3A+%3Chttp%3A%2F%2Fpublications.europa.eu%2Fontology%2Feuvoc%2FlegalDescriptions%23%3E%0A++++++++++++PREFIX+lemon%3A+%3Chttp%3A%2F%2Flemon-model.net%2Flemon%23%3E%0A++++++++++++PREFIX+lexinfo%3A+%3Chttp%3A%2F%2Fwww.lexinfo.net%2Fontology%2F2.0%2Flexinfo%23%3E%0A++++++++++++PREFIX+lexvo%3A+%3Chttp%3A%2F%2Flexvo.org%2Fontology%23%3E%0A++++++++++++PREFIX+linguisticDescriptions%3A+%3Chttp%3A%2F%2Fpublications.europa.eu%2Fontology%2Feuvoc%2FlinguisticDescriptions%23%3E%0A++++++++++++PREFIX+locn%3A+%3Chttps%3A%2F%2Fwww.w3.org%2Fns%2Flocn%23%3E%0A++++++++++++PREFIX+luc%3A+%3Chttp%3A%2F%2Fwww.ontotext.com%2Fowlim%2Flucene%23%3E%0A++++++++++++PREFIX+oa%3A+%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Foa%23%3E%0A++++++++++++PREFIX+ontology%3A+%3Chttps%3A%2F%2Fwww.geonames.org%2Fontology%23%3E%0A++++++++++++PREFIX+org%3A+%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Forg%23%3E%0A++++++++++++PREFIX+organisationDescriptions%3A+%3Chttp%3A%2F%2Fpublications.europa.eu%2Fontology%2Feuvoc%2ForganisationDescriptions%23%3E%0A++++++++++++PREFIX+owl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E%0A++++++++++++PREFIX+qb%3A+%3Chttp%3A%2F%2Fpurl.org%2Flinked-data%2Fcube%23%3E%0A++++++++++++PREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0A++++++++++++PREFIX+rdf4j%3A+%3Chttp%3A%2F%2Frdf4j.org%2Fschema%2Frdf4j%23%3E%0A++++++++++++PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0A++++++++++++PREFIX+schema%3A+%3Chttp%3A%2F%2Fschema.org%2F%3E%0A++++++++++++PREFIX+sesame%3A+%3Chttp%3A%2F%2Fwww.openrdf.org%2Fschema%2Fsesame%23%3E%0A++++++++++++PREFIX+sf%3A+%3Chttp%3A%2F%2Fwww.opengis.net%2Font%2Fsf%23%3E%0A++++++++++++PREFIX+skos%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0A++++++++++++PREFIX+skosxl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2008%2F05%2Fskos-xl%23%3E%0A++++++++++++PREFIX+spatial%3A+%3Chttp%3A%2F%2Fgeovocab.org%2Fmappings%2Fspatial%23%3E%0A++++++++++++PREFIX+spatialDescriptions%3A+%3Chttp%3A%2F%2Fpublications.europa.eu%2Fontology%2Feuvoc%2FspatialDescriptions%23%3E%0A++++++++++++PREFIX+spdx%3A+%3Chttp%3A%2F%2Fspdx.org%2Frdf%2Fterms%23%3E%0A++++++++++++PREFIX+tableDescriptions%3A+%3Chttp%3A%2F%2Fpublications.europa.eu%2Fontology%2Feuvoc%2FtableDescriptions%23%3E%0A++++++++++++PREFIX+temporalDescriptions%3A+%3Chttp%3A%2F%2Fpublications.europa.eu%2Fontology%2Feuvoc%2FtemporalDescriptions%23%3E%0A++++++++++++PREFIX+terms%3A+%3C%27http%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0A++++++++++++PREFIX+time%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2006%2Ftime%23%3E%0A++++++++++++PREFIX+vann%3A+%3Chttp%3A%2F%2Fpurl.org%2Fvocab%2Fvann%2F%3E%0A++++++++++++PREFIX+vcard%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2006%2Fvcard%2Fns%23%3E%0A++++++++++++PREFIX+wgs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2003%2F01%2Fgeo%2Fwgs84_pos%23%3E%0A++++++++++++PREFIX+xkos%3A+%3Chttp%3A%2F%2Frdf-vocabulary.ddialliance.org%2Fxkos%23%3E%0A++++++++++++PREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0A%0A++++++++++++SELECT+%3Fs+%3Fcode+%3Fregion_name+%3Flevel+%3Fparent+WHERE+%7B%0A++++++++++++++++%3Fs+a+skos%3AConcept%3B%0A++++++++++++++++skos%3AinScheme+%3Fscheme%3B%0A++++++++++++++++++++++++skosxl%3AprefLabel+%3FRegion%3B%0A++++++++++++++++++++++++skos%3AaltLabel+%3Fname%3B%0A++++++++++++++++++++++++%3Alevel+%3Flevel%3B%0A++++++++++++++++++++skos%3Anotation+%3Fcode+.%0A++++++++++++++++OPTIONAL+%7B%3Fs+%3AregionOrder+%3FregionOrder+.%7D%0A++++++++++++++++OPTIONAL+%7B%3Fs+skos%3Abroader+%3FBT+.+%3FBT+skos%3Anotation+%3FBT_Code.+%7D%0A++++++++++++++++BIND+%28STR%28%3FBT_Code%29+as+%3Fparent+%29%0A++++++++++++++++%3FRegion+skosxl%3AliteralForm+%3Fregion_name+.%0A++++++++++++++++%3Fscheme+skosxl%3AprefLabel+%3FLabel.%0A++++++++++++++++%3FLabel+skosxl%3AliteralForm+%3FName+.%0A%0A++++++++++++++++FILTER+%28+%3Fscheme+%3D+%3Chttp%3A%2F%2Fdata.europa.eu%2Fnuts%2Fscheme%2F2024%3E+%29%0A++++++++++++%7D%0A++++++++++++ORDER+BY+%3Fs%0A++++++++
The above server error caused the following client error: RPC_ERROR: Odoo Server Error RPCError@http://172.26.0.45:8069/web/assets/debug/web.assets_backend.js:10504:9 (/web/static/src/core/network/rpc_service.js:11) makeErrorFromResponse@http://172.26.0.45:8069/web/assets/debug/web.assets_backend.js:10527:19 (/web/static/src/core/network/rpc_service.js:34) jsonrpc/promise</<@http://172.26.0.45:8069/web/assets/debug/web.assets_backend.js:10580:48 (/web/static/src/core/network/rpc_service.js:87)
@pedrobaeza
We are not using this module anymore.
Why ?
Because we don't have customers needing it.
Ok. But if there is someone that who wants to keep using this module in Odoo Community, what happen ? there is another solution ?
Thank you.
Well, I'm just saying that as we are not using the module anymore, we are not aware nor going to fix anything about it, but feel free to investigate yourself, fund someone to do it, or wait for other one to solve it. The issue is still opened as the problem hasn't been confirmed nor denied.
OK. I submited the PR number #2029 that fix the issue.
Salvo.
OK, it sounds weird that they allow the downloading depending on the agent user, but if it's that way, there are now new maintainers declared that can check it and have been automatically pinged.
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.
Good morning everyone, any news on this issue?
OK. I submited the PR number #2029 that fix the issue.
Adding the user-agent didn't solve it for me on v18.0