Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when instantiating a Model class #385

Open
Mark531 opened this issue Jul 11, 2024 · 1 comment
Open

Crash when instantiating a Model class #385

Mark531 opened this issue Jul 11, 2024 · 1 comment

Comments

@Mark531
Copy link

Mark531 commented Jul 11, 2024

Describe the bug
I've just installed python-mip and instantiating a Model class with no parameter causes a crash.

To Reproduce
Executing this code:

from mip import Model

m = Model()

produces this error and triggers a python kernel restart:

Windows fatal exception: access violation

Expected behavior
Instantiating a Model class should not produce any error.

Desktop (please complete the following information):

  • Operating System, version: Windows 10, version 22H2
  • Python version: 3.12.0
  • Python-MIP version (we recommend you to test with the latest version): 1.14.2

Additional context
Executed within a Spyder IDE.

@rtonoue
Copy link

rtonoue commented Dec 8, 2024

I also faced to similar problem with exactly same code.

  • OS: Windows 11, 23H2
  • Python version: 3.12.4
  • Python-MIP version: 1.15.0
  • Python and packages are managed by uv
  • IDE: VSCode

When executed by debug mode, it crushed at cbc.py

cbclib = ffi.dlopen(libfile)

I think this is due to that cffi v1.15.1 installed with mip does not support Python 3.12.
According to the cffi documentation, support for Python 3.12 is started from v1.16.0.

However, I could not update cffi to v1.16.0 because mip=1.15.0 depends on cffi>=1.15.dev0,<1.16.dev0.

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

No branches or pull requests

2 participants