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