简体   繁体   中英

YQLResponseMalformedError: Response malformed on yahoo_finance?

yahoo_finance's get_historical function has been working fine for me until yesterday.

Now it just keeps giving me YQLResponseMalformedError every time I try to call get_historical. Any ideas? I literally did nothing new with the code.

from yahoo_finance import Share
yahoo = Share('YHOO')
yahoo.refresh()
yahoo.get_historical('2014-04-26', '2014-04-29')
---------------------------------------------------------------------------
YQLResponseMalformedError                 Traceback (most recent call last)
<ipython-input-8-fbc20f9b6d26> in <module>()
----> 1 yahoo.get_historical('2014-04-26', '2014-04-29')

/Users/anjian/anaconda/lib/python2.7/site-packages/yahoo_finance-1.4.0-py2.7.egg/yahoo_finance/__init__.pyc in get_historical(self, start_date, end_date)
    340             try:
    341                 query = self._prepare_query(table='historicaldata', startDate=s, endDate=e)
--> 342                 result = self._request(query)
    343                 if isinstance(result, dict):
    344                     result = [result]

/Users/anjian/anaconda/lib/python2.7/site-packages/yahoo_finance-1.4.0-py2.7.egg/yahoo_finance/__init__.pyc in _request(self, query)
    123                 raise YQLQueryError(response['error']['description'])
    124             except KeyError:
--> 125                 raise YQLResponseMalformedError()
    126         else:
    127             if self._is_error_in_results(results):

YQLResponseMalformedError: Response malformed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM