From 938568ace7d8aa873181114d4c1f49c76efb8b55 Mon Sep 17 00:00:00 2001 From: Shankari Date: Mon, 14 Sep 2020 20:45:46 -0700 Subject: [PATCH] handle the case where `last_ts_processed` is None got a TypeError here when we were experimenting with loading data for app store review Testing done: - Reran the pipeline; the error went away --- emission/analysis/intake/segmentation/trip_segmentation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/emission/analysis/intake/segmentation/trip_segmentation.py b/emission/analysis/intake/segmentation/trip_segmentation.py index 562b31106..5c11aea05 100644 --- a/emission/analysis/intake/segmentation/trip_segmentation.py +++ b/emission/analysis/intake/segmentation/trip_segmentation.py @@ -149,6 +149,8 @@ def get_last_ts_processed(filter_methods): if last_ts_processed is None or method.last_ts_processed > last_ts_processed: last_ts_processed = method.last_ts_processed logging.debug("Set last_ts_processed = %s from method %s" % (last_ts_processed, method)) + except TypeError as e: + logging.debug("Processing method %s got error %s, skipping" % (method, e)) except AttributeError as e: logging.debug("Processing method %s got error %s, skipping" % (method, e)) logging.info("Returning last_ts_processed = %s" % last_ts_processed)