CVX with Gurobi error warning

I run a LP in CVX using GUROBI. I received the error message as below.

Error using cvx_end (line 267)
model.quadcon must be a struct array with fields q, and rhs

What could be the reason?

Best regards

There seem to be some bugs or incompatibilities in the CVX/Gurobi interface. Can you rtry a different solver?

1 Like

I tried MOSEK and it worked now. Thank you for your message!

1 Like

Hi, I am facing the same error. This issue only appears with the default GUROBI packaged with CVX v2.2. Using CVX with an external GUROBI installation solves the problem correctly. Where should I go to report this bug?

1 Like

Bug reporting instructions at

As mentioned in another thread, try the latest build, 1148, of CVX 2.2 before filing a bug report.

Thank you. I will do that. This bug persists for me in the latest build, 1148, of CVX 2.2.

1 Like

Hi. I have the same error when I used the cvx. Could I ask how to use CVS with an external GUROBI ? I have very limited knowledge about this. Thank you so much.

There is no updated information on difficulties using Girobi under CVX beyond what is mentioned earlier in this thread,

There are kn known bugs I am aware of in the CVX 2,2/Mosek 9.2 interface, so you may wish to use that combination if Mosek is available to you. It can handle all problem classes which CVX 2.2//Gurobi 9.0 can, plus handle SDP constraints, which Gurobi can’t (except for those which CVX is able to transform into SOCP constraints)… However, Mosek is not necessarily as fast at solving mixed integer problems as Gurobi.

I meet the same problem. I am very happy that the problem is solved when I use the Gurobi 9.1.2 with Cvx 2.2. The fact shows that the Gurobi 9.0.0 which is attached to Cvx 2.2 exists some bug. Hope that can help you.