bertbert72 / HomeAssistant_VirginTivo

HomeAssistant component for control of Virgin Media Tivo boxes
GNU General Public License v3.0
27 stars 22 forks source link

0.1.7 - won't start. #44

Closed richard-scott closed 4 years ago

richard-scott commented 4 years ago

I've just updated via HACS to 0.1.7 and now I get this:

Log Details (ERROR)
Logger: homeassistant.components.media_player
Integration: Media player (documentation, issues)
First occured: 7:17:06 PM (1 occurences)
Last logged: 7:17:06 PM

Error while setting up virgintivo platform for media_player
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, 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 "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/virgintivo/media_player.py", line 216, in setup_platform
    force_hd_on_tv, guide, keep_connected))
  File "/config/custom_components/virgintivo/media_player.py", line 315, in __init__
    self.get_guide_channels()
  File "/config/custom_components/virgintivo/media_player.py", line 334, in get_guide_channels
    "url": next(iter([a["url"] for a in urls
  File "/config/custom_components/virgintivo/media_player.py", line 335, in <listcomp>
    if "assetType" in a and a["assetType"] == "imageStream"]), None),
KeyError: 'url'
bertbert72 commented 4 years ago

What channel are you on when this happens? I think it is missing some of the normal data. I should be able to handle it if I can replicate it.

bertbert72 commented 4 years ago

Actually, I've just restarted and found it. Nothing to do with the latest release. Looks like channel 406 has something funky happening on it in the channels list rather than the guide listings themselves. I'll have a look.

bertbert72 commented 4 years ago

0.1.8 should fix this problem. Let me know if it doesn't.

richard-scott commented 4 years ago

All good now. Many thanks for a quick fix 👍