1 | initial version |
I see two possible problems with your code:
the MIPSolverException
is not imported by Sage by default, so you have to import it first:
sage: from sage.numerical.mip import MIPSolverException
when you write
....: except MIPSolverException:
you have to do something with it, like:
....: except MIPSolverException:
....: print 'n is not large enough
or, more simply
....: except MIPSolverException:
....: pass
2 | No.2 Revision |
I see two possible problems with your code:
the MIPSolverException
is not imported by Sage by default, so you have to import it first:
sage: from sage.numerical.mip import when you write
....: except you have to do something with it, like:
....: except MIPSolverException:
....: print 'n is not large enough
or, more simply
....: except MIPSolverException:
....: pass