Python:请求中URL超过了最大重试次数



我正试图使用pdr从圣路易斯FRED下载数据。

fred = pdr.DataReader(['GS10', 'INDPRO'], 'fred', '2000', '2019')
fred

然而,我得到了以下错误。有人知道怎么解决这个问题吗?

ConnectionError: HTTPSConnectionPool(host='fred.stlouisfed.org', port=443): Max retries exceeded with url: /graph/fredgraph.csv?id=GS10 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000002328B189520>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

你能详细解释一下上下文吗?给我们一部分您运行的代码。也许我可以帮你。

相关内容

最新更新