From e6438ab89d4907597f73d65b2b03ec2f5893ab59 Mon Sep 17 00:00:00 2001 From: Anson Date: Sun, 7 Feb 2021 10:30:40 -0700 Subject: [PATCH] bug fix --- functions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions.py b/functions.py index 4ee4d7f..c05a226 100644 --- a/functions.py +++ b/functions.py @@ -192,6 +192,11 @@ _Donations can only be made in a chat directly with @simplestockbot_ if response.status_code == 200: IEXData = response.json() + try: # Some symbols dont return if the market is open + IEXData["isUSMarketOpen"] + except KeyError: + IEXData["isUSMarketOpen"] = True + if ( IEXData["isUSMarketOpen"] or (IEXData["extendedChangePercent"] == None)