Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Download Data Due to "RemoteDataError" #148

Closed
arthurzllu opened this issue Jul 3, 2021 · 5 comments
Closed

Cannot Download Data Due to "RemoteDataError" #148

arthurzllu opened this issue Jul 3, 2021 · 5 comments

Comments

@arthurzllu
Copy link

arthurzllu commented Jul 3, 2021

Hi all,

Two days ago, I tried to use ffn to get data from yahoo finance (by default), but the program left this error message to me.

My statement was:

aapl = ffn.get("aapl", start = "2020-05-06")

The program showed me:

RemoteDataError: Unable to read URL: https://finance.yahoo.com/quote/aapl/history?period1=1588737600&period2=1625371199&interval=1d&frequency=1d&filter=history

I have tried different ticks and doublechecked the usage manual to see if any API is changed, but in vain. So would you please help me solve this issue? Thank you.

BR,
Arthur

@timkpaine
Copy link
Collaborator

We rely on pandas-datareader for this functionality

@arthurzllu
Copy link
Author

We rely on pandas-datareader for this functionality

Hi timkpaine,

Thank you for quick reply. I run my program with ffn in Colab. However, I check my version of pandas-datareader on Colab and it is 0.9, satisfied with the requirement of ffn. I will check if I could run ffn in the host machine, instead of Colab. Thank you again.

@arthurzllu
Copy link
Author

We rely on pandas-datareader for this functionality

Hi timkpaine,

Thank you for quick reply. I run my program with ffn in Colab. However, I check my version of pandas-datareader on Colab and it is 0.9, satisfied with the requirement of ffn. I will check if I could run ffn in the host machine, instead of Colab. Thank you again.

I've tried the testing programs wit ffn on Windows 10 and Fedora. Neither case is successful. The error is still RemoteDataError:

Traceback (most recent call last):
File "/media/sf_R_DRIVE/pyf_4_factor_models.py", line 117, in
df_Ri = ffn.get(selected_ticks[0], start = "2016-01-01", end = "2019-04-30")
File "", line 2, in get
File "/usr/local/lib/python3.9/site-packages/ffn/utils.py", line 34, in _memoize
cache[key] = result = func(*args, **kw)
File "/usr/local/lib/python3.9/site-packages/ffn/data.py", line 76, in get
data[ticker] = provider(ticker=t, field=f, mrefresh=mrefresh, **kwargs)
File "", line 2, in yf
File "/usr/local/lib/python3.9/site-packages/ffn/utils.py", line 34, in _memoize
cache[key] = result = func(*args, **kw)
File "/usr/local/lib/python3.9/site-packages/ffn/data.py", line 140, in yf
tmp = pdata.get_data_yahoo(ticker, start=start, end=end)
File "/usr/local/lib/python3.9/site-packages/pandas_datareader/data.py", line 86, in get_data_yahoo
return YahooDailyReader(*args, **kwargs).read()
File "/usr/local/lib/python3.9/site-packages/pandas_datareader/base.py", line 253, in read
df = self._read_one_data(self.url, params=self._get_params(self.symbols))
File "/usr/local/lib/python3.9/site-packages/pandas_datareader/yahoo/daily.py", line 153, in _read_one_data
resp = self._get_response(url, params=params)
File "/usr/local/lib/python3.9/site-packages/pandas_datareader/base.py", line 181, in _get_response
raise RemoteDataError(msg)
pandas_datareader._utils.RemoteDataError: Unable to read URL: https://finance.yahoo.com/quote/1316.tw/history?period1=1451592000&period2=1556654399&interval=1d&frequency=1d&filter=history

(... ignore the html content below)

@timkpaine
Copy link
Collaborator

@arthurzllu
Copy link
Author

https://github.com/pydata/pandas-datareader/issues

Got it. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants