0

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'
DeepSpace
  • 78,697
  • 11
  • 109
  • 154
Johan hvn
  • 318
  • 1
  • 2
  • 11

2 Answers2

0

The error appeared during instantiating of Retry and said Retry is a class from urllib3.

There is raise_on_status in urllib3 in the repository. Perhaps you have an older version of urllib3 and need to upgrade it.

phd
  • 82,685
  • 13
  • 120
  • 165
0

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!!

lmiguelvargasf
  • 63,191
  • 45
  • 217
  • 228