Python Forum
Error with web.DataReader
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error with web.DataReader
#1
Hi, I've found out that for some reason web.DataReader is not working for some of the tickers and I cannot understand why...

For example, when I try to retrieve historical stock prices of Noble Energy (its symbol is 'NBL') web.DataReader fails. However I am able to see all the requered data in Google Finance website (https://www.google.com/finance/historica...WPULejj8gP)

I cannot understand what can cause this problem. Will appreciate your help

import datetime
import pandas_datareader.data as web

start = datetime.datetime(2017, 6, 20)
end = datetime.datetime(2017, 6, 20)

df3 = web.DataReader('NBL', "google", start, end)
Reply
#2
This is a valid error.

It is always necessary to post the traceback with any error

your request produces:
Error:
Traceback (most recent call last):  File "<stdin>", line 1, in <module>  File "C:\Python36\lib\site-packages\pandas_datareader\data.py", line 133, in DataReader    session=session).read()  File "C:\Python36\lib\site-packages\pandas_datareader\base.py", line 157, in read    params=self._get_params(self.symbols))  File "C:\Python36\lib\site-packages\pandas_datareader\base.py", line 74, in _read_one_data    out = self._read_url_as_StringIO(url, params=params)  File "C:\Python36\lib\site-packages\pandas_datareader\base.py", line 85, in _read_url_as_StringIO    response = self._get_response(url, params=params)  File "C:\Python36\lib\site-packages\pandas_datareader\base.py", line 120, in _get_response    raise RemoteDataError('Unable to read URL: {0}'.format(url)) pandas_datareader._utils.RemoteDataError: Unable to read URL: http://www.google.com/finance/historical?q=NBL&startdate=Jun+20%2C+2017&enddate=Jun+20%2C+2017&output=csv
If you try to connect to that url, you'll get a 400 status code (URL not found)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  pandas DataReader error on all data sources glidecode 5 18,059 Sep-25-2019, 02:10 PM
Last Post: perfringo
  unable to locate package - pandas datareader Grin 3 6,203 Apr-12-2018, 11:43 AM
Last Post: Grin
  question on pandas datareader kit12_31 3 9,160 Feb-05-2018, 11:55 PM
Last Post: snippsat
  1 I cant read many stocks(list) with pandas-datareader from yahoo Davidii111 1 4,908 Dec-27-2017, 04:47 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020