From 282132295efb6099c49d8ca9f970d4f0ad29dedb Mon Sep 17 00:00:00 2001 From: Anastasia Nayden <33293844+a-nayden@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:13:45 +0100 Subject: [PATCH 1/2] Update to 2.10 --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8aec1e2..6bf9a8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,12 +7,12 @@ jobs: # The CKAN version tag of the Solr and Postgres containers should match # the one of the container the tests run on. # You can switch this base image with a custom image tailored to your project - image: openknowledge/ckan-dev:2.9 + image: openknowledge/ckan-dev:2.10.1 services: solr: image: ckan/ckan-solr-dev:2.9 postgres: - image: ckan/ckan-postgres-dev:2.9 + image: ckan/ckan-postgres-dev:2.10 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres From 53c2a82009ff7c071e948ee9343fbe842ff755ac Mon Sep 17 00:00:00 2001 From: Hans-Chrstian Date: Thu, 25 Jan 2024 15:07:09 +0100 Subject: [PATCH 2/2] Fix the encoding to UTF-8 --- ckanext/fairdatapoint/harvesters/domain/fair_data_point.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ckanext/fairdatapoint/harvesters/domain/fair_data_point.py b/ckanext/fairdatapoint/harvesters/domain/fair_data_point.py index 715e682..77f902f 100644 --- a/ckanext/fairdatapoint/harvesters/domain/fair_data_point.py +++ b/ckanext/fairdatapoint/harvesters/domain/fair_data_point.py @@ -4,6 +4,7 @@ import logging import requests +import encodings from rdflib import Graph, URIRef from rdflib.exceptions import ParserError @@ -44,6 +45,7 @@ def _get_data(path: Union[str, URIRef]) -> Union[str, None]: } try: response = requests.request("GET", path, headers=headers) + response.encoding = encodings.utf_8.getregentry().name response.raise_for_status() return response.text except (HTTPError, ConnectionError, Timeout, RequestException) as e: