gpt4 book ai didi

python - SSLError : HTTPSConnectionPool(host ='www.quandl.com' , 端口=443):超过最大重试次数

转载 作者:行者123 更新时间:2023-11-28 19:05:03 25 4
gpt4 key购买 nike

我遇到了一个问题。请帮助我

代码如下:

import pandas
import quandl
import time

df = quandl.get('FINRA/FNSQ_GOOGL')
print(df.head())

我面临的错误是:

Traceback (most recent call last):

File "C:\Users\Desktop\My Folder\test.py", line 5, in <module>
df = quandl.get('FINRA/FNSQ_GOOGL')

File "C:\Python27\lib\site-packages\quandl\get.py", line 48, in get
data = Dataset(dataset_args['code']).data(params=kwargs, handle_column_not_found=True)

File "C:\Python27\lib\site-packages\quandl\model\dataset.py", line 47, in data
return Data.all(**updated_options)

File "C:\Python27\lib\site-packages\quandl\operations\list.py", line 14, in all
r = Connection.request('get', path, **options)

File "C:\Python27\lib\site-packages\quandl\connection.py", line 36, in request
return cls.execute_request(http_verb, abs_url, **options)

File "C:\Python27\lib\site-packages\quandl\connection.py", line 50, in execute_request
raise e

SSLError: HTTPSConnectionPool(host='www.quandl.com', port=443): Max retries exceeded with url: /api/v3/datasets/FINRA/FNSQ_GOOGL/data?order=asc (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

import pandas 
import quandl
import time

df=''
while df=='':
try:
df = quandl.get('FINRA/FNSQ_GOOGL')
except:
time.sleep(5)
print("try")
continue
print(df.head())

如果有人帮我解决这个问题,我将不胜感激。提前致谢!!

最佳答案

这是防火墙问题。当我关闭防火墙时,我能够获取数据集。

关于python - SSLError : HTTPSConnectionPool(host ='www.quandl.com' , 端口=443):超过最大重试次数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47960157/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com