From 9bed830fb31ebc42d631ab2f6b9f7be3f6b9419b Mon Sep 17 00:00:00 2001 From: Kotesh Kumar Yelamati Date: Wed, 15 Jul 2026 00:08:53 -0400 Subject: [PATCH] Fix bare except clause in twython/api.py --- twython/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twython/api.py b/twython/api.py index 1e786ad..102aeeb 100644 --- a/twython/api.py +++ b/twython/api.py @@ -548,7 +548,7 @@ def unicode2utf8(text): try: if is_py2 and isinstance(text, str): text = text.encode('utf-8') - except: + except (UnicodeEncodeError, AttributeError): pass return text