Skip to main content

Unable to retrieve attribute 'BarIterCount'

Comments

10 comments

  • Eli Towle
    Gurobi Staff Gurobi Staff

    Can you please post the Gurobi log (add \( \texttt{verbose=True} \) as an argument to Problem.solve()) and a minimal working code example that reproduces the error? 

    0
  • Shuvo Newaz
    Gurobi-versary
    Conversationalist

    Has there been a solution to this? I'm getting the same error when the problem size becomes moderately large. The same code works fine for small problems.

    1
  • Chunyang Liao
    Gurobi-versary
    First Question
    First Comment

    No, I talked to others but we failed to find a solution. We simply changed another solver to fix it.

    0
  • Eli Towle
    Gurobi Staff Gurobi Staff

    What version of CVXPY are you using? I suspect this is a known CVXPY issue that was recently resolved.

    0
  • Shuvo Newaz
    Gurobi-versary
    Conversationalist

    I'm using version 1.1.7. Has it been resolved in the later versions?

    0
  • Eli Towle
    Gurobi Staff Gurobi Staff

    Yes; if it's the same issue, it was fixed in CVXPY v1.1.11.

    0
  • Shuvo Newaz
    Gurobi-versary
    Conversationalist

    Thanks! How do I update it to 1.1.11?

    0
  • Shuvo Newaz
    Gurobi-versary
    Conversationalist

    I updated it to 1.1.12, but it still fails. I'll switch back to MOSEK for this problem, I guess.

    -1
  • Eli Towle
    Gurobi Staff Gurobi Staff

    Just to be sure your Python environment is using the correct CVXPY version, can you try printing the value of \( \texttt{cvxpy.__version__}\) in your code? I only see one place in the CVXPY codebase where CVXPY queries the BarIterCount attribute, and it is written to handle an AttributeError.

    It would also be helpful to see the full error message you encounter.

    0
  • Shuvo Newaz
    Gurobi-versary
    Conversationalist

    BarIterCount is no longer the problem. It just says GUROBI can't solve it, and recommends to use another solver.

    "cvxpy.error.SolverError: Solver 'GUROBI' failed.

    MOSEK appears to be working fine for the larger problems. GUROBI was much faster than MOSEK in the smaller problems, so it would have been convenient if it could be used.

    0

Please sign in to leave a comment.