Skip to content

Commit 74f9a90

Browse files
committed
fix exception for no data with YahooDailyReader
1 parent a1cf7a2 commit 74f9a90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas_datareader/yahoo/daily.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def _read_one_data(self, url, params):
149149
try:
150150
j = json.loads(re.search(ptrn, resp.text, re.DOTALL).group(1))
151151
data = j["context"]["dispatcher"]["stores"]["HistoricalPriceStore"]
152-
except KeyError as exc:
152+
except (KeyError, AttributeError) as exc:
153153
msg = "No data fetched for symbol {} using {}"
154154
raise RemoteDataError(msg.format(symbol, self.__class__.__name__)) from exc
155155

0 commit comments

Comments
 (0)