From 56a74255b60d08edf89f1d6a0a3090356092efb8 Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 2 May 2021 14:35:24 +0200 Subject: [PATCH] Fix Alexa and RuntimeError: dictionary keys changed during iteration --- resources/lib/companion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/companion.py b/resources/lib/companion.py index 2034c530..077474fd 100644 --- a/resources/lib/companion.py +++ b/resources/lib/companion.py @@ -48,7 +48,7 @@ def convert_alexa_to_companion(dictionary): """ The params passed by Alexa must first be converted to Companion talk """ - for key in dictionary: + for key in list(dictionary): if key in v.ALEXA_TO_COMPANION: dictionary[v.ALEXA_TO_COMPANION[key]] = dictionary[key] del dictionary[key]