Python: getting core dumped on import #4649
Replies: 4 comments 3 replies
-
|
Most likely a protobuf conflict. Could be abseil too. |
Beta Was this translation helpful? Give feedback.
-
|
I do not know. But there are no dependency conflicts in the test environment. |
Beta Was this translation helpful? Give feedback.
-
|
did you try to |
Beta Was this translation helpful? Give feedback.
-
|
I just tried it: import ortools
import ortools.sat.python.cp_model
import grpc_tools.protocThis changes the error output to However, in my actual project I have to load the grpc stuff first and in general, a wrong import order in python should not cause such erros, right? I am no expert on c or c++. ps: I am currently using ortools 9.9 which avoids avoids those core dumps, but 9.12 is the clearly superior solver. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What version of OR-Tools and what language are you using?
Version: 9.12
Language: Python3.12.3
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
I try to use the CP solver (I fail importing from SAT)
What operating system (Linux, Windows, ...) and version?
Linux (Ubuntu)
What did you do?
Steps to reproduce the behavior:
I get a core dump while importing ortools modules in a specific context ,i.e., after doing other imports.
I broke it down to the following minimal example:
python3 -m venv) with only gpcio-tools and ortools installed:What did you expect to see
A successful import.
What did you see instead?
Make sure you include information that can help us debug (full error message, model Proto).
Anything else we should know about your project / environment
I created this example by listing all loaded modules in python before the critical import happened. Then I deleted them sequentially without the error disappearing. In the real project the import of grpc-related modules happens because is use sila2 (is on pip).
Beta Was this translation helpful? Give feedback.
All reactions