Kodi component degradation in 0.34.0

Hi,

I just tried th 0.34.0 docker image. Aside from the fact that it does not even come up, I’m now getting a lenghty error message regarding my (turned off) kodi box.
So far, I usually got this:

16-12-04 11:53:49 homeassistant.components.media_player: Error while setting up platform kodi

which is okay, since the box is completely turned off.

Now I’m also seeing this:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_component.py", line 150, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "uvloop/future.pyx", line 230, in __iter__ (uvloop/loop.c:103945)
  File "uvloop/future.pyx", line 432, in uvloop.loop.BaseTask._fast_wakeup (uvloop/loop.c:107104)
  File "uvloop/future.pyx", line 101, in uvloop.loop.BaseFuture._result_impl (uvloop/loop.c:102363)
  File "/usr/local/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/media_player/kodi.py", line 59, in setup_platform
    turn_off_action=config.get(CONF_TURN_OFF_ACTION)),
  File "/usr/src/app/homeassistant/components/media_player/kodi.py", line 80, in __init__
    self.update()
  File "/usr/src/app/homeassistant/components/media_player/kodi.py", line 114, in update
    self._players = self._get_players()
  File "/usr/src/app/homeassistant/components/media_player/kodi.py", line 91, in _get_players
    return self._server.Player.GetActivePlayers()
  File "/usr/local/lib/python3.5/site-packages/jsonrpc_requests/jsonrpc.py", line 112, in __call__
    return self.__request_method(self.__method_name, args, kwargs)
  File "/usr/local/lib/python3.5/site-packages/jsonrpc_requests/jsonrpc.py", line 96, in __request
    return self.send_request(method_name, is_notification, args or kwargs)
  File "/usr/local/lib/python3.5/site-packages/jsonrpc_requests/jsonrpc.py", line 37, in send_request
    response = self.request(data=request_body)
  File "/usr/local/lib/python3.5/site-packages/requests/sessions.py", line 535, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/requests/sessions.py", line 474, in request
    prep = self.prepare_request(req)
  File "/usr/local/lib/python3.5/site-packages/requests/sessions.py", line 407, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "/usr/local/lib/python3.5/site-packages/requests/models.py", line 306, in prepare
    self.prepare_auth(auth, url)
  File "/usr/local/lib/python3.5/site-packages/requests/models.py", line 527, in prepare_auth
    r = auth(self)
  File "/usr/local/lib/python3.5/site-packages/requests/auth.py", line 68, in __call__
    r.headers['Authorization'] = _basic_auth_str(self.username, self.password)
  File "/usr/local/lib/python3.5/site-packages/requests/auth.py", line 38, in _basic_auth_str
    b64encode(b':'.join((username, password))).strip()
TypeError: sequence item 0: expected a bytes-like object, NoneType found

Sebastian

The same issue in 0.34.0 on Windows 10

This fixed it for me: https://github.com/home-assistant/home-assistant/issues/4666

Thanks!
Unfortunately i cannot (easily) downgrade the requests package since I’m running the docker image.
But it might be a workaround for others.
I’m staying at 0.33.1 for now…

Sebastian