# MethodError: no method matching Gurobi.Env(::Ptr{Nothing})

**URL:** https://discourse.julialang.org/t/methoderror-no-method-matching-gurobi-env-ptr-nothing/34555
**Category:** Optimization (Mathematical)
**Created:** [February 13, 2020, 4:11am UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-gurobi-env-ptr-nothing/34555 "2020-02-13T04:11:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ken\_Lin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ken_lin/32/14367_2.png) [@Ken\_Lin](https://discourse.julialang.org/u/Ken_Lin)
#### Post date: [February 13, 2020, 4:11am UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-gurobi-env-ptr-nothing/34555/1 "2020-02-13T04:11:51Z")

</div>

Hello,  
I tried setting the Gurobi parameter “NonConvex” to 2 and I got the following error: “MethodError: no method matching Gurobi.Env(::Ptr{Nothing})”. My Julia Gurobi version is v0.7.5 and I am using Julia 1.3.1. I got this error with JuMP v0.18.6 and v0.20.1. I would appreciate it if you could help me! Please see the screenshot below:

JuMP v0.18.6:

 ![gurobi_error](https://global.discourse-cdn.com/julialang/original/3X/8/c/8c3f968a6c7336f4097ebc5dd80fab99d576ae92.png)

---

<div class="post-metadata">

### Author: ![blegat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blegat/32/217090_2.png) [@blegat](https://discourse.julialang.org/u/blegat)
#### Post date: [February 13, 2020, 8:37am UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-gurobi-env-ptr-nothing/34555/2 "2020-02-13T08:37:08Z")

</div>

This parameter is not allowed in Gurobi v7.5, this is a new feature of Gurobi v9.0. The `MethodError` is a bug though, you should get an helpful error message instead, thanks for reporting it.  
**EDIT** : should be fixed by [https://github.com/JuliaOpt/Gurobi.jl/pull/291](https://github.com/JuliaOpt/Gurobi.jl/pull/291)
