realthk / asyncpioneer

Async Pioneer AVR for Home Assitant
27 stars 22 forks source link

AttributeError: 'NoneType' object has no attribute 'keys' #12

Closed jtonk closed 4 years ago

jtonk commented 4 years ago

Hi,

I'm getting an error since your last update, see log below. VSX-923 & Home Assistant 0.110.3 (Docker)

regards,

Jasper

Logger: homeassistant.components.media_player Source: custom_components/asyncpioneer/media_player.py:245 Integration: Media player (documentation, issues) First occurred: 4:58:05 PM (1 occurrences) Last logged: 4:58:05 PM

Error while setting up asyncpioneer platform for media_player

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/config/custom_components/asyncpioneer/media_player.py", line 245, in async_setup_platform for zone in add_zones.keys(): AttributeError: 'NoneType' object has no attribute 'keys'

jtonk commented 4 years ago

Hi,

I think it's fixed in the last commit, thanks! any change you will implement and treble & bass? and listening mode?

regards,

Jasper

realthk commented 4 years ago

Sorry, zone2 support was added in a rush, I accidentally left out a simple condition check if it is in use at all in the current config (and it didn't occur on mine, because zone2 is enabled - but that detailed error message made it obvious where lies the problem)

Might do that as well, but probably not in the next few weeks (I hardly use this AV amp now)