From 55a84494c901a71d69fcbceecc1102149292d7f0 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Wed, 11 May 2022 16:53:20 +0200 Subject: [PATCH] fixed issue with plan to eat importer --- cookbook/integration/plantoeat.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cookbook/integration/plantoeat.py b/cookbook/integration/plantoeat.py index d1004f70c..b0ed72181 100644 --- a/cookbook/integration/plantoeat.py +++ b/cookbook/integration/plantoeat.py @@ -78,7 +78,11 @@ class Plantoeat(Integration): current_recipe = '' for fl in file.readlines(): - line = fl.decode("windows-1250") + try: + line = fl.decode("utf-8") + except UnicodeDecodeError: + line = fl.decode("windows-1250") + if line.startswith('--------------'): if current_recipe != '': recipe_list.append(current_recipe)