Skip to content

solver.status_name() raises TypeError: 'ortools.sat.python.cp_model_helper.CpSolverStatus' object is not callable #4985

@gacheiro

Description

@gacheiro

What version of OR-Tools and what language are you using?
Version: v9.15.6755
Language: Python

Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
solver: CP-SAT

What operating system (Linux, Windows, ...) and version?
OS: Linux

What did you do?
After solving a model with the CP-SAT solver, the callable solver.status_name() raises:

TypeError: 'ortools.sat.python.cp_model_helper.CpSolverStatus' object is not callable

Steps to reproduce the behavior:

model = cp_model.CpModel()
model.minimize(1)
solver = cp_model.CpSolver()
status = solver.Solve(model)
print(solver.status_name())

What did you expect to see
Should print "OPTIMAL"

What did you see instead?
TypeError: 'ortools.sat.python.cp_model_helper.CpSolverStatus' object is not callable

It works for version 9.14.6206

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions