意外的关键字参数'raise_on_status' [英] unexpected keyword argument 'raise_on_status'

查看:154
本文介绍了意外的关键字参数'raise_on_status'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用pip安装了quandl. 我导入并尝试了它:

I installed quandl using pip. I imported it and tried it:

import quandl
mydata = quandl.get("FRED/GDP")
print(df.head())

这导致以下错误. 有什么建议如何解决吗?

This resulted in the error below. Any suggestions how to solve it?

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-a47ca7d841f3> in <module>()
      1 import quandl
      2 #df = quandl.get("SSE/SVHG")
----> 3 mydata = quandl.get("FRED/GDP")
      4 #mydata = quandl.get("DATABASE_CODE2/DATASET_CODE2")
      5 print(df.head())
......


~/.local/lib/python3.5/site-packages/quandl/connection.py in get_retries(cls)
     72                         status_forcelist=ApiConfig.retry_status_codes,
     73                         backoff_factor=ApiConfig.retry_backoff_factor,
---> 74                         raise_on_status=False)
     75 
     76         return retries

TypeError: __init__() got an unexpected keyword argument 'raise_on_status'

推荐答案

cd ~/.local/lib/python3.5/site-packages/quandl/并打开connection.py. 转到第74行,并删除参数raise_on_status 为我工作!

cd ~/.local/lib/python3.5/site-packages/quandl/ and Open connection.py. Go to line 74 and remove the argument raise_on_status Worked for me!!

这篇关于意外的关键字参数'raise_on_status'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆