1

Im following a tutorial on ML and quandl and have imported quandl and dependencies for python3. When I run

import quandl

data = quandl.get("EIA/PET_RWTC_D")
print(data.head())

I have a quandl account and this code is from the quandl python docs since I wanted to make sure the tutorial was not wrong (https://www.youtube.com/watch?v=JcI5Vnw0b2c&list=PLQVvvaa0QuDfKTOs3Keq_kaG2P55YRn5v&index=2) (I made sure it was lowercase quandl for import since it differed due to the posted date of the video), I also tried with my api_key and using that arg in quandl.get()

I get the error:

Traceback (most recent call last):
File "ml_regression1.py", line 4, in <module>
quandl.get("EIA/PET_RWTC_D", authtoken="MyAuthTokenPlaceHolder")
File "/usr/local/lib/python3.5/dist-packages/quandl/get.py", line 48, in get
   data = Dataset(dataset_args['code']).data(params=kwargs, handle_column_not_found=True)
File "/usr/local/lib/python3.5/dist-packages/quandl/model/dataset.py", line 47, in data
    return Data.all(**updated_options)
File "/usr/local/lib/python3.5/dist-packages/quandl/operations/list.py", line 14, in all
    r = Connection.request('get', path, **options)
File "/usr/local/lib/python3.5/dist-packages/quandl/connection.py", line 38, in request
    return cls.execute_request(http_verb, abs_url, **options)
File "/usr/local/lib/python3.5/dist-packages/quandl/connection.py", line 42, in execute_request
    session = cls.get_session()
File "/usr/local/lib/python3.5/dist-packages/quandl/connection.py", line 58, in get_session
    adapter = HTTPAdapter(max_retries=cls.get_retries())
File "/usr/local/lib/python3.5/dist-packages/quandl/connection.py", line 74, in get_retries
    raise_on_status=False)
TypeError: __init__() got an unexpected keyword argument 'raise_on_status'

Any help would be great, thank you.

1 Answers1

2

pip3 install --upgrade urllib3 solved the problem for me (urllib3 was not up to date).

see also https://stackoverflow.com/a/53375266/8496767