Skip to content

Conversation

@Markus28
Copy link
Contributor

An unexpected exception is encountered in the code below

>>> import mip
>>> m = mip.Model()
>>> m.remove(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/markus/OpenSourceDev/python-mip/mip/model.py", line 1429, in remove
    "Cannot handle removal of object of type "
TypeError: can only concatenate str (not "type") to str

We would want it to throw TypeError: Cannot handle removal of object of type <class 'NoneType'> from model but while the error message is assembled, a different exception is encountered because you are trying to concatenate a string to a type.

Not a big issue but it's a quick fix :)

@CLAassistant
Copy link

CLAassistant commented Jul 11, 2022

CLA assistant check
All committers have signed the CLA.

@sebheger sebheger merged commit 8a6ac41 into coin-or:master Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants