diff --git a/pandas_datareader/data.py b/pandas_datareader/data.py
index ea635e85..252796d8 100644
--- a/pandas_datareader/data.py
+++ b/pandas_datareader/data.py
@@ -701,9 +701,6 @@ def _option_frames_from_url(self, url):
calls = frames[self._TABLE_LOC['calls']]
puts = frames[self._TABLE_LOC['puts']]
- if len(calls) == 0 or len(puts) == 0:
- raise RemoteDataError('Received no data from Yahoo at url: %s' % url)
-
calls = self._process_data(calls, 'call')
puts = self._process_data(puts, 'put')
diff --git a/pandas_datareader/tests/data/yahoo_options3.html b/pandas_datareader/tests/data/yahoo_options3.html
new file mode 100644
index 00000000..6e79bb9b
--- /dev/null
+++ b/pandas_datareader/tests/data/yahoo_options3.html
@@ -0,0 +1,2807 @@
+
+
+
+
+ SPWR Option Chain | Yahoo! Inc. Stock - Yahoo! Finance
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Dow
+
+
+
+
+
+
+ 0.58%
+
+
+
+
+
+
+
Nasdaq
+
+
+
+
+
+
+ 0.32%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
More on SPWR
+
+
+
+
+
Quotes
+
+
+
Charts
+
+
+
News & Info
+
+
+
Company
+
+
+
Analyst Coverage
+
+
+
Ownership
+
+
+
Financials
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
SunPower Corporation (SPWR)
+
+ Watchlist
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Calls
+
+
+
+
+
+
+
+
+
+
+
+ 30.50
+ |
+
+
+ |
+
+ 3.57
+ |
+
+ 3.30
+ |
+
+ 4.20
+ |
+
+ -0.49
+ |
+
+
+
+
+ -13.73%
+
+
+ |
+
+ 10
+ |
+
+ 20
+ |
+
+ 55.08%
+ |
+
+
+
+
+ 35.00
+ |
+
+
+ |
+
+ 1.10
+ |
+
+ 1.06
+ |
+
+ 1.44
+ |
+
+ 0.00
+ |
+
+
+
+ 0.00%
+
+
+
+ |
+
+ 107
+ |
+
+ 119
+ |
+
+ 52.20%
+ |
+
+
+
+
+ 42.00
+ |
+
+
+ |
+
+ 0.41
+ |
+
+ 0.00
+ |
+
+ 0.50
+ |
+
+ 0.00
+ |
+
+
+
+ 0.00%
+
+
+
+ |
+
+ 20
+ |
+
+ 10
+ |
+
+ 54.00%
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Puts
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pandas_datareader/tests/test_data.py b/pandas_datareader/tests/test_data.py
index ecf99436..b8a7afc1 100644
--- a/pandas_datareader/tests/test_data.py
+++ b/pandas_datareader/tests/test_data.py
@@ -280,6 +280,7 @@ def setUpClass(cls):
cls.dirpath = tm.get_data_path()
cls.html1 = os.path.join(cls.dirpath, 'yahoo_options1.html')
cls.html2 = os.path.join(cls.dirpath, 'yahoo_options2.html')
+ cls.html3 = os.path.join(cls.dirpath, 'yahoo_options3.html') #Empty table GH#22
cls.data1 = cls.aapl._option_frames_from_url(cls.html1)['puts']
@classmethod
@@ -398,6 +399,11 @@ def test_month_year(self):
self.assertTrue(len(data) > 1)
+ def test_empty_table(self):
+ #GH22
+ empty = self.aapl._option_frames_from_url(self.html3)['puts']
+ self.assertTrue(len(empty) == 0)
+
class TestOptionsWarnings(tm.TestCase):
@classmethod
@@ -410,7 +416,7 @@ def tearDownClass(cls):
def test_options_source_warning(self):
if not assert_produces_warning:
- raise SkipTest("old version of pandas without "
+ raise nose.SkipTest("old version of pandas without "
"compat.assert_produces_warning")
with assert_produces_warning():
aapl = web.Options('aapl')