DBNomics FetchError Python API

Hi,

since this month I am facing an issue with the API for the following statement:

    def source_gdp_historical(self):
        return dbnomics.fetch_series(dataset_code="IFS", provider_code="IMF",
                                 series_code=f"A.{'+'.join(self.countries['Alpha-2'])}.NGDP_R_XDC", max_nb_series=500)

The following error is produced when calling my function:

dbnomics.FetchError: Could not fetch data from URL 'https://api.db.nomics.world/v22/series/IMF/IFS/A.AD+AE+AF+AG+AG+AI+AL+AM+AO+AQ+AR+AS+AT+AU+AW+AX+AZ+BA+BB+BD+BE+BF+BG+BH+BI+BJ+BL+BM+BN+BO+BQ+BR+BS+BT+BV+BW+BY+BZ+CA+CC+CD+CF+CG+CH+CI+CK+CL+CM+CN+CO+CR+CU+CV+CW+CX+CY+CZ+CZ+DE+DJ+DK+DM+DO+DZ+EC+EE+EG+EH+ER+ES+ET+FI+FJ+FK+FM+FO+FR+GA+GB+GD+GE+GF+GG+GH+GI+GL+GM+GN+GP+GQ+GR+GS+GT+GU+GW+GY+HK+HM+HN+HR+HT+HU+ID+IE+IL+IM+IN+IO+IQ+IR+IS+IT+JE+JM+JO+JP+KE+KG+KH+KI+KM+KN+KP+KR+KW+KY+KZ+LA+LB+LC+LI+LK+LR+LS+LT+LU+LV+LY+MA+MC+MD+ME+MF+MG+MH+MK+MK+ML+MM+MN+MO+MP+MQ+MR+MS+MT+MU+MV+MW+MX+MY+MZ+NA+NC+NE+NF+NG+NI+NL+NO+NP+NR+NU+NZ+OM+PA+PE+PF+PG+PH+PK+PL+PM+PN+PR+PS+PT+PW+PY+QA+RE+RO+RS+RU+RW+SA+SB+SC+SD+SE+SG+SH+SI+SJ+SK+SL+SM+SN+SO+SR+SS+ST+SV+SX+SY+SZ+SZ+TC+TD+TF+TG+TH+TJ+TK+TL+TL+TM+TN+TO+TR+TT+TT+TV+TW+TZ+UA+UG+UM+US+UY+UZ+VA+VC+VE+VG+VI+VN+VU+WF+WS+XK+YE+YT+ZA+ZM+ZW.NGDP_R_XDC?observations=1&offset=0'

When accessing the link directly via a browser you get the following error message:
{“_meta”:{“version”:“22.1.17”},“message”:“500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.”}

If “observations=1” is removed from the URL a response is given.

For context I am using Python 3.12. I have seen a similiar issue where the root cause was the httpx package. I have tried the newest Version, the Version that fixed the issue in the old Topic and a few between.

I am also using the latest dbnomics api version 1.2.6 (also tried 1.2.5)

Can you help me fix the issue?
Thank you!

Edit: From manual testing I saw that if I reduce the amount of countries to (<=100) the API request works. I will check tomorrow if it also works in the Python call.
A workaround could then be to loop over the countries and merge the results.

The internal Server Error also occurs when accessing the same data on the DBNomics side and clicking “Download”