python - Trouble with http request from Google Compute Engine -


i'm trying set google compute engine server pull options data using python pandas. when make request mac @ home, have problems late @ night when yahoo! resetting servers (the data being pulled yahoo! finance). when try doing same thing compute engine server, request fails of stocks i'm interested in, although typically works options on larger companies, such 'aapl' or 'ge'. on computer @ home, running @ same time, same requests succeed both small , large companies.

the requests typically take few seconds, maybe many 15. there way more extensive logs going on when make these requests on google servers? things can think of there permissions issues reason these specific http requests or there timeout configured that's interfering. far can tell, general timeout should 75 seconds kind of request, , there's no way it's taking long.

here's sample of see python shell:

>>> pandas.io.data import options >>> spwr = options('spwr', 'yahoo') >>> data = spwr.get_all_data() traceback (most recent call last):   file "<stdin>", line 1, in <module>   file "/mnt/disk1/venv/optbot/local/lib/python2.7/site-packages/pandas/io/data.py", line 1090, in get_all_data     return self._get_data_in_date_range(dates=expiry_dates, call=call, put=put)   file "/mnt/disk1/venv/optbot/local/lib/python2.7/site-packages/pandas/io/data.py", line 1104, in _get_data_in_date_range     frame = self._get_option_data(expiry=expiry_date, name=name)   file "/mnt/disk1/venv/optbot/local/lib/python2.7/site-packages/pandas/io/data.py", line 723, in _get_option_data     frames = self._get_option_frames_from_yahoo(expiry)   file "/mnt/disk1/venv/optbot/local/lib/python2.7/site-packages/pandas/io/data.py", line 655, in _get_option_frames_from_yahoo     option_frames = self._option_frames_from_url(url)   file "/mnt/disk1/venv/optbot/local/lib/python2.7/site-packages/pandas/io/data.py", line 692, in _option_frames_from_url     raise remotedataerror('received no data yahoo @ url: %s' % url) pandas.io.data.remotedataerror: received no data yahoo @ url: http://finance.yahoo.com/q/op?s=spwr&date=1430438400 >>> aapl = options('aapl', 'yahoo') >>> data = aapl.get_all_data() >>> 

i've never yet been successful in getting options data 'spwr', work larger companies.

any ideas how might fix issue? or logs tell me more what's happening here?

this caused issue in pandas 0.15.2. when reverted pandas 0.15.1, started working again. issue has been filed pandas. check there see if has been resolved in later releases.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -