forked from dr-leo/pandaSDMX
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
enhEnhancements & new featuresEnhancements & new featureshelp welcomeIssues that depend on contributions from new developersIssues that depend on contributions from new developersreaderRead file formats defined by the SDMX standardsRead file formats defined by the SDMX standardswishlistNo current plan or schedule to implementNo current plan or schedule to implement
Description
ecb = sdmx.Client("ECB", backend="memory")
params = dict(startPeriod="2024")
data_msg = ecb.data("ICB", params=params)This runs but gives an error:
File [~/.local/lib/python3.10/site-packages/sdmx/client.py:496](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/ek/DataLab/lsd/~/.local/lib/python3.10/site-packages/sdmx/client.py:496) in get
msg = reader.read_message(response_content, structure=kwargs.get("dsd", None))
...
...
...
XMLSyntaxError: no element foundWhat happens is that ICB table is empty for 2024:
https://data-api.ecb.europa.eu/service/data/ICB?startPeriod=2024
My suggestion is to add additional check before using the reader to read message:
if len(response_content) == 0:
raise exception(with meaningful text)
msg = reader.read_message(response_content, structure=kwargs.get("dsd", None))Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhEnhancements & new featuresEnhancements & new featureshelp welcomeIssues that depend on contributions from new developersIssues that depend on contributions from new developersreaderRead file formats defined by the SDMX standardsRead file formats defined by the SDMX standardswishlistNo current plan or schedule to implementNo current plan or schedule to implement