From 676378b4fb30de1a30c310fd0cd51b1ba0b79204 Mon Sep 17 00:00:00 2001 From: jableader Date: Sun, 22 Sep 2024 12:09:52 +1000 Subject: [PATCH] Fixed recipe parsing for py3.11 --- ingredients/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ingredients/__init__.py b/ingredients/__init__.py index 5c85cb2..0d4799d 100644 --- a/ingredients/__init__.py +++ b/ingredients/__init__.py @@ -39,7 +39,7 @@ def parse_ingredient_from_nlp(ingredient_string: str) -> Ingredient: quantity = amount.quantity if unit is None and amount.unit: - real_unit = units.get_unit(amount.unit) + real_unit = units.get_unit(str(amount.unit)) if real_unit: unit = real_unit.name