You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/vikas/.local/lib/python3.8/site-packages/pandas/util/_decorators.py", line 210, in wrapper
return func(*args, **kwargs)
File "/home/vikas/.local/lib/python3.8/site-packages/pandas_datareader/data.py", line 370, in DataReader
return YahooDailyReader(
File "/home/vikas/.local/lib/python3.8/site-packages/pandas_datareader/base.py", line 253, in read
df = self._read_one_data(self.url, params=self._get_params(self.symbols))
File "/home/vikas/.local/lib/python3.8/site-packages/pandas_datareader/yahoo/daily.py", line 152, in _read_one_data
j = json.loads(re.search(ptrn, resp.text, re.DOTALL).group(1))
AttributeError: 'NoneType' object has no attribute 'group'
The text was updated successfully, but these errors were encountered:
Problem seem to be caused by this code snippet (at line 149 in yahoo/daily.py):
try:
j = json.loads(re.search(ptrn, resp.text, re.DOTALL).group(1))
data = j["context"]["dispatcher"]["stores"]["HistoricalPriceStore"]
except KeyError as exc:
msg = "No data fetched for symbol {} using {}"
raise RemoteDataError(msg.format(symbol, self.class.name)) from exc
if pattern is not found, re.search() returns None while the programmer was expecting a KeyError exception.
Nobody fixed the problem in the last 8 months.
Is there still a pilot on this plane?
Run the following code to reproduce the issue:
You will get the following exception:
The text was updated successfully, but these errors were encountered: