Skip to content
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

Alphavantage sensor not working in 0.64 #12673

Closed
arsaboo opened this issue Feb 25, 2018 · 3 comments · Fixed by #12726

Comments

@arsaboo
Copy link
Contributor

commented Feb 25, 2018

Home Assistant release (hass --version): 0.64

Python release (python3 --version): 3.6.2

Component/platform: Alphavantage

Description of problem: With the last update, Alphavantage sensor is not working. I am seeing the following error:

2018-02-25 17:20:30 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform alpha_vantage
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 84, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/sensor/alpha_vantage.py", line 86, in setup_platform
    for symbol in symbols:
TypeError: 'NoneType' object is not iterable

Here's my config (which was working before the update):

  - platform: alpha_vantage
    api_key: !secret alphavantage_key
    foreign_exchange:
      - from: USD
        to: INR
        name: USDINR
@edif30

This comment has been minimized.

Copy link
Contributor

commented Feb 25, 2018

I just found this in ALL Changes section of the release notes for 0.64 and it says (Breaking Change) under it :).

#12252

However I don't understand what is required here. It looks like symbols: are needed but I have that and no dice.

  - platform: alpha_vantage
    api_key: !secret alpha_api
    symbols:
      - name: <stock>
        currency: USD
        symbol: <stock>

Same error as @arsaboo

2018-02-25 18:19:58 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform alpha_vantage
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 84, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.6/site-packages/homeassistant/components/sensor/alpha_vantage.py", line 97, in setup_platform
    for conversion in conversions:
TypeError: 'NoneType' object is not iterable
@thijsdejong

This comment has been minimized.

Copy link
Contributor

commented Feb 26, 2018

It seems you should configure both symbols: and foreign_exchange:.

@arsaboo

This comment has been minimized.

Copy link
Contributor Author

commented Feb 26, 2018

@bakedraccoon you are right....both are required. But that does not sound right.

cc: @ChristianKuehnel

ChristianKuehnel added a commit to ChristianKuehnel/home-assistant that referenced this issue Feb 26, 2018
@ChristianKuehnel ChristianKuehnel referenced this issue Feb 26, 2018
2 of 9 tasks complete
balloob added a commit that referenced this issue Feb 27, 2018
balloob added a commit that referenced this issue Feb 27, 2018
@balloob balloob referenced this issue Feb 27, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.