Commit ff8f1da5 authored by Bruno Duyé's avatar Bruno Duyé
Browse files

Fix #972: Python client: '+' in series codes is interpreted as spaces by API

parent c83e8126
Pipeline #243125 passed with stage
in 1 minute and 48 seconds
......@@ -25,6 +25,7 @@ import itertools
import json
import logging
import os
import urllib
from collections import defaultdict
from urllib.parse import urljoin
......@@ -188,7 +189,9 @@ def fetch_series(
if series_ids is not None:
if provider_code or dataset_code:
raise ValueError("When you use `series_ids`, you must not specifiy `provider_code` nor `dataset_code`.")
api_link = series_base_url + "?observations=1&series_ids={}".format(",".join(series_ids))
api_link = series_base_url + "?observations=1&series_ids={}".format(
",".join(map(urllib.parse.quote, series_ids))
return fetch_series_by_api_link(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment