I use pandas.datareader to download FRED data. The code is quite simple and worked well. I updated pandas and pandas-datareader in the new version of my software and since then it doesn't work anymore.
import pandas_datareader
import pandas as pd
downloader = pandas_datareader.fred
df_idx = downloader.FredReader('USD1MTD156N', start='1986-01-02', end='2021-06-30').read()
There are similar answers (for Yahoo) to this problem (for example: How to fix new unable to read URL error in python for yahoo finance). But I don't find them very clear and so I can't find a solution adapted to the FRED case. Of course I would like to keep up to date with pandas and pandas-datareader versions.
error: RemoteDataError}Unable to read URL: https://fred.stlouisfed.org/graph/fredgraph.csv? id=USD1MTD156N Response Text:
pandas version: 1.4.2
pandas-datareader: 0.10.0