python - Repeatedly try to download data from web using pandas_datareader try again -


i downloading stock data using pandas_datareader. however, sometimes, perhaps due bad internet connection, no data received @ first try. there way re-try download without running command again?

here's error message:

traceback (most recent call last): file "", line 25, in file "/library/frameworks/python.framework/versions/3.6/lib/python3.6/site-packages/pandas_datareader/data.py", line 121, in datareader session=session).read() file "/library/frameworks/python.framework/versions/3.6/lib/python3.6/site-packages/pandas_datareader/yahoo/daily.py", line 115, in read df = super(yahoodailyreader, self).read() file "/library/frameworks/python.framework/versions/3.6/lib/python3.6/site-packages/pandas_datareader/base.py", line 181, in read params=self._get_params(self.symbols)) file "/library/frameworks/python.framework/versions/3.6/lib/python3.6/site-packages/pandas_datareader/base.py", line 79, in _read_one_data out = self._read_url_as_stringio(url, params=params) file "/library/frameworks/python.framework/versions/3.6/lib/python3.6/site-packages/pandas_datareader/base.py", line 90, in _read_url_as_stringio response = self._get_response(url, params=params) file "/library/frameworks/python.framework/versions/3.6/lib/python3.6/site-packages/pandas_datareader/base.py", line 139, in _get_response raise remotedataerror('unable read url: {0}'.format(url)) pandas_datareader._utils.remotedataerror: unable read url: https://query1.finance.yahoo.com/v7/finance/download/bayn.de?period1=1497823200&period2=1505339999&interval=1d&events=history&crumb=dmi5e%5cu002fuumm9

thanks help!


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -