From c63a4544ef6d326e06b3d5ff55a7b0c48967c281 Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Tue, 21 Sep 2021 23:53:14 -0400 Subject: [PATCH] Remove bare except in DV --- doctor_visits/delphi_doctor_visits/weekday.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doctor_visits/delphi_doctor_visits/weekday.py b/doctor_visits/delphi_doctor_visits/weekday.py index 86e5278b2..bb1c4bf5e 100644 --- a/doctor_visits/delphi_doctor_visits/weekday.py +++ b/doctor_visits/delphi_doctor_visits/weekday.py @@ -9,6 +9,7 @@ # third party import cvxpy as cp +from cvxpy.error import SolverError import numpy as np # first party @@ -92,7 +93,7 @@ def get_params(data): _ = prob.solve() params[i,:] = b.value break - except: + except SolverError: # If the magnitude of the objective function is too large, an error is # thrown; Rescale the objective function by going through loop pass