Skip to content

Commit a473bd2

Browse files
author
Martin Stransky
committed
fix UnboundLocalError: cannot access local variable 'mip' error
1 parent 0ccb811 commit a473bd2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: mip/model.py

+2
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ def __init__(
106106

107107
self.solver = mip.cbc.SolverCbc(self, name, sense)
108108
self.solver_name = mip.CBC
109+
else:
110+
import mip
109111

110112
# list of constraints and variables
111113
self.constrs = mip.ConstrList(self)

0 commit comments

Comments
 (0)