I am using Request package form pandasdmx library to to access some exchange rates from the European Central Bank. I tried to follow the stepts highlighted in the following walkthrough: https://pandasdmx.readthedocs.io/en/v1.0/walkthrough.html# bur it is giving me an error when i try to access the different dataflows. This is the code that i am using:
import pandasdmx as sdmx
ecb = sdmx.Request('ECB')
ecb_via_proxy = sdmx.Request('ECB',proxies={'http': 'http://1.2.3.4:5678'})
flow_msg = ecb.dataflow()
flow_msg = ecb.dataflow()
Traceback (most recent call last):
File "<ipython-input-8-9011799aab2e>", line 1, in <module>
flow_msg = ecb.dataflow()
File "C:\Users\gcperez\AppData\Local\Continuum\anaconda3\lib\site-packages\pandasdmx\api.py", line 361, in get
base_url, params=params, headers=headers, fromfile=fromfile)
File "C:\Users\gcperez\AppData\Local\Continuum\anaconda3\lib\site-packages\pandasdmx\remote.py", line 98, in get
url, params=params, headers=headers)
File "C:\Users\gcperez\AppData\Local\Continuum\anaconda3\lib\site-packages\pandasdmx\remote.py", line 118, in request
with closing(requests.get(url, params=params, **cur_config)) as response:
File "C:\Users\gcperez\AppData\Local\Continuum\anaconda3\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "C:\Users\gcperez\AppData\Local\Continuum\anaconda3\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\gcperez\AppData\Local\Continuum\anaconda3\lib\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\gcperez\AppData\Local\Continuum\anaconda3\lib\site-packages\requests\sessions.py", line 665, in send
history = [resp for resp in gen] if allow_redirects else []
File "C:\Users\gcperez\AppData\Local\Continuum\anaconda3\lib\site-packages\requests\sessions.py", line 665, in <listcomp>
history = [resp for resp in gen] if allow_redirects else []
File "C:\Users\gcperez\AppData\Local\Continuum\anaconda3\lib\site-packages\requests\sessions.py", line 166, in resolve_redirects
raise TooManyRedirects('Exceeded {} redirects.'.format(self.max_redirects), response=resp)
TooManyRedirects: Exceeded 30 redirects.
I have used this kind of access many times before and nothing went wrong. ¿Anyone knows what could be happening?