Skip to content

Commit ad27478

Browse files
authored
Merge pull request #697 from bashtage/catch-keyerror
BUG: Catch empty DataFrame
2 parents 0b76a81 + 91ecada commit ad27478

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ script:
5959
cd docs
6060
make html
6161
cd ..
62-
doctr deploy devel --build-tags
6362
if [[ -z "$TRAVIS_TAG" ]]; then
64-
echo "Not a tagged build."
63+
doctr deploy devel --build-tags
6564
else
6665
doctr deploy . --build-tags
6766
fi

docs/source/whatsnew/v0.8.0.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Bug Fixes
6262
- Fix eurostat URL. (:issue:`669`)
6363
- Adjust Alphavantage time series reader to account for descending ordering. (:issue:`666`)
6464
- Fix bug in downloading index historical constituents. (:issue:`591`)
65+
- Fix a bug that occurs when an endpoint returns has no data for a date range. (:issue:`640`)
6566

6667
Contributors
6768
~~~~~~~~~~~~

pandas_datareader/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def _dl_mult_symbols(self, symbols):
252252
try:
253253
stocks[sym] = self._read_one_data(self.url, self._get_params(sym))
254254
passed.append(sym)
255-
except IOError:
255+
except (IOError, KeyError):
256256
msg = "Failed to read symbol: {0!r}, replacing with NaN."
257257
warnings.warn(msg.format(sym), SymbolWarning)
258258
failed.append(sym)

0 commit comments

Comments
 (0)