From 946c10e3aa2de697a4c3229f04acaef7078a0e78 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 23 Jul 2021 15:32:21 +0100 Subject: [PATCH] Handle posts without text --- utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils.py b/utils.py index ea0be45c5..6d0bea5f6 100644 --- a/utils.py +++ b/utils.py @@ -852,6 +852,8 @@ def _genderFromString(translate: {}, text: str) -> str: """Given some text, does it contain a gender description? """ gender = None + if not text: + return None textOrig = text text = text.lower() if translate['He/Him'].lower() in text or \