Closed staper1960 closed 1 year ago
import yahooquery as yq
a=yq.search('US5949181045',first_quote=True) print(a)
This is supposed to return data about ticker MSFT by isin. Worked fine till yesterday. Today, 21/6 sometimes works, and at other times it returns:
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\spera\Pycharmprojects\IBKR API\TWS API\samples\Python\Testbed\WORKING\test2.py", line 3, in a=yq.search('US5949181045',first_quote=True) File "C:\Users\spera\Anaconda3\envs\Python37\lib\site-packages\yahooquery\misc.py", line 61, in search data = _make_request(url, country=country, params=params) File "C:\Users\spera\Anaconda3\envs\Python37\lib\site-packages\yahooquery\misc.py", line 29, in _make_request json = r.json() File "C:\Users\spera\Anaconda3\envs\Python37\lib\site-packages\requests\models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
This is just a function of YF's own search endpoint, which means I have no control over how items are returned. Going to close as there's nothing I can do here.
import yahooquery as yq
a=yq.search('US5949181045',first_quote=True) print(a)
This is supposed to return data about ticker MSFT by isin. Worked fine till yesterday. Today, 21/6 sometimes works, and at other times it returns:
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\spera\Pycharmprojects\IBKR API\TWS API\samples\Python\Testbed\WORKING\test2.py", line 3, in
a=yq.search('US5949181045',first_quote=True)
File "C:\Users\spera\Anaconda3\envs\Python37\lib\site-packages\yahooquery\misc.py", line 61, in search
data = _make_request(url, country=country, params=params)
File "C:\Users\spera\Anaconda3\envs\Python37\lib\site-packages\yahooquery\misc.py", line 29, in _make_request
json = r.json()
File "C:\Users\spera\Anaconda3\envs\Python37\lib\site-packages\requests\models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)