-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
yahoo_finance.py errors out in initialization #9144
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
Labels
Comments
Added the component (also Hass.io .51.2) and can confirm the same error. |
Seems to be an issue with the module we use: $ python3
>>> from yahoo_finance import Share
>>> yahoo = Share('YHOO')
[...]
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request |
The errors are back! 2017-11-03 22:17:05 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform yahoo_finance
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/yahoo_finance/__init__.py", line 120, in _request
_, results = response['query']['results'].popitem()
AttributeError: 'NoneType' object has no attribute 'popitem'
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/yahoo_finance/__init__.py", line 123, in _request
raise YQLQueryError(response['error']['description'])
KeyError: 'error'
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 170, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib/python3.6/asyncio/tasks.py", line 352, in wait_for
return fut.result()
File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
raise self._exception
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/homeassistant/components/sensor/yahoo_finance.py", line 49, in setup_platform
if Share(symbol).get_price() is None:
File "/usr/lib/python3.6/site-packages/yahoo_finance/__init__.py", line 178, in __init__
self.refresh()
File "/usr/lib/python3.6/site-packages/yahoo_finance/__init__.py", line 142, in refresh
self.data_set = self._fetch()
File "/usr/lib/python3.6/site-packages/yahoo_finance/__init__.py", line 181, in _fetch
data = super(Share, self)._fetch()
File "/usr/lib/python3.6/site-packages/yahoo_finance/__init__.py", line 134, in _fetch
data = self._request(query)
File "/usr/lib/python3.6/site-packages/yahoo_finance/__init__.py", line 125, in _request
raise YQLResponseMalformedError()
yahoo_finance.YQLResponseMalformedError: Response malformed. EDITIt appears that there is a notice on the Yahoo Finance site indicating that the terms of service are in violation. |
#10873 is a replacement. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (
hass --version
):Using hassio 0.51.2 (HA 0.52.0 not yet available...)
Python release (
python3 --version
):Component/platform:
yahoo_finance
Description of problem:
Getting errors for several days. See traceback
Expected:
Problem-relevant
configuration.yaml
entries and steps to reproduce:Traceback (if applicable):
Additional info:
The text was updated successfully, but these errors were encountered: