Yahoo finance error since v0.30.1

Prior to upgrading to v0.30.1, I was able to display 4 stocks on my main page. Since upgrading, I only get 1 stock to display and then have this error in my log file:

yahoo_finance.YQLQueryError: Query failed with error: “‘No definition found for Table yahoo.finance.quotes’”.

Is anyone else having problems with the new Yahoo Finance component?

Seems to be a bug.

Hello @k5map,

Thanks for reporting this issue. I’m already in touch with Yahoo support to check it. It seems to be a problem with Yahoo load balancers, because if you multiple times, eventually it works.

I’m working on it.

@k5map it seems that Yahoo fixed their API servers. Are you still experiencing this issue?

My sensors are working fine since yesterday without any error. Could you confirm the state of yours?

Thanks.

With the v0.30.2 update, all is good for me… many thanks for fixing this so quickly.

1 Like

He’s backkkkkkkkkkk :slight_smile:

Since I installed v0.31.1, the Yahoo Finance component is not working and here is the error in my log file:

yahoo_finance.YQLQueryError: Query failed with error: “‘No definition found for Table yahoo.finance.quotes’”.

Is this a bug in v0.31.1 or was there a change that I missed?

Hello @k5map,
Yes, I got the same issue yesterday. The problem is not with the Home Assistant but with Yahoo API.
I noticed that some people also reported the same issue to Yahoo as well.
It Yahoo does not get stable let’s create another sensor from a different provider to track the stocks price.

While working on the upgrade to 1.3.2 of yahoo-finance it worked fine for me.

It seems the service got back working today. I tested on Yahoo 1.3.2 and 1.2.1 and both worked fine.

Thanks for working on https://github.com/home-assistant/home-assistant/pull/4040 @fabaff!

sorry to jump this older thread, but it seemed appropriate :slight_smile:
no matter what i try, my yahoo finance install won’t work as expected, and, always gives error in the log:

2017-11-14 00:43:14 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'

During handling of the above exception, another exception occurred:

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'

During handling of the above exception, another exception occurred:

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. 

my finance definitions in the configuration files all have their issues: Yahoo just doesn’t work, coinmarketcap won’t allow me to define anything but the sensor (all #-commented-out lines give errors), and i had to write 3 sensors for ,the Fixer where would have wanted that to be 1 fixer sensor with several entities. Please have a look and don’t spare me… Thanks,
Marius

- platform: yahoo_finance
  symbols:
    - RHT
    - GOOGL

- platform: coinmarketcap
#  display_currency: EUR
#  currency: etheurum
#    - bitcoin
#    - litecoin
#    - ripple

- platform: fixer
  target: EUR
  base: USD
  name: Euro - US Dollar

- platform: fixer
  target: EUR
  name: Euro - Indonesia Rupia
  base: IDR

- platform: fixer
  target: EUR
  base: GBP
  name: Euro - Great Britain Pound

@Mariusthvdb this seems to be a problem related to the external library.

There is one issue already reporting similar problem -> https://github.com/lukaszbanasiak/yahoo-finance/issues/141 and https://github.com/lukaszbanasiak/yahoo-finance/issues/140

I’m currently working to get stocks information from Google since Yahoo has been very stable lately.

mmello

ok thanks,
that being the case, maybe Yahoo finance should be pulled from the components page…

could you comment on the 2 other services, fixer and coin market?

the fixer entry, i would like to make it nest with entities if possible, the coin market just doesn’t work with any thing below the -platform line…