Closed DFranzen closed 6 years ago
The error seems to only appear, if no player has been active ever since the server was started. In that case self._groups(response, 'playerid', extra_bools=['power', 'connected']) returns [{}] instead of the expected []. Could it be that line 170 (yield dict(group)) has to be guarded by another if group:
hmm... with fix in server.py still getting same KeyError, e.g. through NowPlayingIntent:
Refreshing server and player statuses... Found 0 player(s): [] 'playerid': KeyError Traceback (most recent call last): File "/var/task/handler.py", line 37, in lambda_handler raise e File "/var/task/handler.py", line 34, in lambda_handler return sqa.handle(event, context) File "/var/task/squeezealexa/main.py", line 78, in handle return super(SqueezeAlexa, self).handle(event, context) File "/var/task/squeezealexa/alexa/handlers.py", line 49, in handle return self.on_intent(request, session) File "/var/task/squeezealexa/main.py", line 122, in on_intent pid = self.player_id_from(intent) File "/var/task/squeezealexa/main.py", line 648, in player_id_from srv = self.get_server() File "/var/task/squeezealexa/main.py", line 113, in get_server debug=DEBUG_LMS) File "/var/task/squeezealexa/squeezebox/server.py", line 66, in init print_d("Default player is now %s" % (self.players[pid],)) KeyError: 'playerid'
@crmbls That looks like a different version from line 66 on v1.3.
On further looking, that's actually a different (related) bug with a similar exception, also when no players are found,
Trace output from "increase Volume" intent
Same intent works without problem, after my player has been started