Skip to content

Commit d7c31ca

Browse files
committed
Merge pull request #10609 from sinhrks/fama
TST: test_read_famafrench fails with HTTP 404
2 parents c87fa18 + 68b43d8 commit d7c31ca

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

doc/source/whatsnew/v0.17.0.txt

+2
Original file line numberDiff line numberDiff line change
@@ -382,3 +382,5 @@ Bug Fixes
382382

383383

384384
- Bug in operator equal on Index not being consistent with Series (:issue:`9947`)
385+
386+
- Reading "famafrench" data via ``DataReader`` results in HTTP 404 error because of the website url is changed (:issue:`10591`).

pandas/io/data.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def fetch_data(url, name):
504504

505505
def get_data_famafrench(name):
506506
# path of zip files
507-
zip_file_path = '{0}/{1}.zip'.format(_FAMAFRENCH_URL, name)
507+
zip_file_path = '{0}/{1}_TXT.zip'.format(_FAMAFRENCH_URL, name)
508508

509509
with urlopen(zip_file_path) as url:
510510
raw = url.read()

pandas/io/tests/test_data.py

-2
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,6 @@ def test_read_famafrench(self):
481481
for name in ("F-F_Research_Data_Factors",
482482
"F-F_Research_Data_Factors_weekly", "6_Portfolios_2x3",
483483
"F-F_ST_Reversal_Factor", "F-F_Momentum_Factor"):
484-
raise nose.SkipTest('getting 404 errors as of 7/15/15')
485-
486484
ff = DataReader(name, "famafrench")
487485
self.assertTrue(ff is not None)
488486
self.assertIsInstance(ff, dict)

0 commit comments

Comments
 (0)