# CPLEX Julia/JuMP Connection Problem

**URL:** https://discourse.julialang.org/t/cplex-julia-jump-connection-problem/60724
**Category:** Optimization (Mathematical)
**Created:** [May 7, 2021, 2:49pm UTC](https://discourse.julialang.org/t/cplex-julia-jump-connection-problem/60724 "2021-05-07T14:49:27Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Armando\_Gabriel\_Guar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/armando_gabriel_guar/32/24862_2.png) [@Armando\_Gabriel\_Guar](https://discourse.julialang.org/u/Armando_Gabriel_Guar)
#### Post date: [May 7, 2021, 2:49pm UTC](https://discourse.julialang.org/t/cplex-julia-jump-connection-problem/60724/1 "2021-05-07T14:49:27Z")

</div>

Dear Julia Guys,

I am having a lot of trouble to make cplex run with julia/jump, (Gurobi has been seamless and works perfect). I installed the package and when running the sentence “using CPLEX”, I get the following message. Can you help me out?

julia\> using CPLEX  
[Info: Precompiling CPLEX [a076750e-1247-5638-91d2-ce28b192dca0]  
ERROR: LoadError: ArgumentError: invalid base 10 digit ‘P’ in “Pi\x8e\x14”  
Stacktrace:  
[1] tryparse\_internal(::Type{Int64}, ::SubString{String}, ::Int64, ::Int64, ::Int64, ::Bool) at .\parse.jl:132  
[2] parse(::Type{Int64}, ::SubString{String}; base::Nothing) at .\parse.jl:238  
[3] parse at .\parse.jl:238 [inlined]  
[4] \_broadcast\_getindex\_evalf at .\broadcast.jl:648 [inlined]  
[5] \_broadcast\_getindex at .\broadcast.jl:631 [inlined]  
[6] getindex at .\broadcast.jl:575 [inlined]  
[7] copy at .\broadcast.jl:852 [inlined]  
[8] materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(parse),Tuple{Base.RefValue{Type{Int64}},Base.RefValue{SubString{String}}}}) at .\broadcast.jl:837  
[9] top-level scope at C:\Users\Armando.julia\packages\CPLEX\5NpoU\src\CPLEX.jl:22  
[10] include(::Function, ::Module, ::String) at .\Base.jl:380  
[11] include(::Module, ::String) at .\Base.jl:368  
[12] top-level scope at none:2  
[13] eval at .\boot.jl:347 [inlined]  
[14] eval(::Expr) at .\client.jl:467  
[15] top-level scope at .\none:3  
in expression starting at C:\Users\Armando.julia\packages\CPLEX\5NpoU\src\CPLEX.jl:13  
ERROR: Failed to precompile CPLEX [a076750e-1247-5638-91d2-ce28b192dca0] to C:\Users\Armando.julia\compiled\v1.5\CPLEX\QpT0w\_atEpv.ji.  
Stacktrace:  
[1] error(::String) at .\error.jl:33  
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1305  
[3] \_require(::Base.PkgId) at .\loading.jl:1030  
[4] require(::Base.PkgId) at .\loading.jl:928  
[5] require(::Module, ::Symbol) at .\loading.jl:923

---

<div class="post-metadata">

### Author: ![blob](https://avatars.discourse-cdn.com/v4/letter/b/ebca7d/32.png) [@blob](https://discourse.julialang.org/u/blob)
#### Post date: [May 7, 2021, 4:17pm UTC](https://discourse.julialang.org/t/cplex-julia-jump-connection-problem/60724/2 "2021-05-07T16:17:33Z")

</div>

I ran into similar issues with CPLEX, solved when I reverted to the old version, as suggested here: [https://github.com/jump-dev/CPLEX.jl](https://github.com/jump-dev/CPLEX.jl) Maybe it will help you too?

---

<div class="post-metadata">

### Author: ![Armando\_Gabriel\_Guar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/armando_gabriel_guar/32/24862_2.png) [@Armando\_Gabriel\_Guar](https://discourse.julialang.org/u/Armando_Gabriel_Guar)
#### Post date: [May 7, 2021, 4:55pm UTC](https://discourse.julialang.org/t/cplex-julia-jump-connection-problem/60724/3 "2021-05-07T16:55:15Z")

</div>

Thanks for your reply. I reverted to the old version but the failure to precompile keeps happening.

I also uninstalled cplex 20.1 and kept only CPLEX 12.10. I really don´t know what might be the issue…

Armando

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [May 7, 2021, 8:51pm UTC](https://discourse.julialang.org/t/cplex-julia-jump-connection-problem/60724/4 "2021-05-07T20:51:27Z")

</div>

Can you open an issue at cplex.jl with the details? Please include `versioninfo()`.

cc @dourouc05

---

<div class="post-metadata">

### Author: ![dourouc05](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dourouc05/32/2646_2.png) [@dourouc05](https://discourse.julialang.org/u/dourouc05)
#### Post date: [May 7, 2021, 9:14pm UTC](https://discourse.julialang.org/t/cplex-julia-jump-connection-problem/60724/5 "2021-05-07T21:14:45Z")

</div>

I think there is already an issue for that: [Installation Problem - CPLEX package on Julia · Issue #368 · jump-dev/CPLEX.jl · GitHub](https://github.com/jump-dev/CPLEX.jl/issues/368). However, I really cannot reproduce locally (even though I have a Windows system). I think we need a bit more information, like that `versioninfo()`.

---

<div class="post-metadata">

### Author: ![Armando\_Gabriel\_Guar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/armando_gabriel_guar/32/24862_2.png) [@Armando\_Gabriel\_Guar](https://discourse.julialang.org/u/Armando_Gabriel_Guar)
#### Post date: [May 9, 2021, 10:19pm UTC](https://discourse.julialang.org/t/cplex-julia-jump-connection-problem/60724/6 "2021-05-09T22:19:59Z")

</div>

I have tried several times, reinstalling julia, etc.

julia\> versioninfo()  
Julia Version 1.6.1  
Commit 6aaedecc44 (2021-04-23 05:59 UTC)  
Platform Info:  
OS: Windows (x86\_64-w64-mingw32)  
CPU: Intel(R) Core™ i7-8550U CPU @ 1.80GHz  
WORD\_SIZE: 64  
LIBM: libopenlibm  
LLVM: libLLVM-11.0.1 (ORCJIT, skylake)  
Environment:  
JULIA\_EDITOR = code  
JULIA\_NUM\_THREADS =

The cplex error is:

using CPLEX  
[Info: Precompiling CPLEX [a076750e-1247-5638-91d2-ce28b192dca0]  
ERROR: LoadError: ArgumentError: invalid base 10 digit ‘\xf0’ in “\xf0\xefs\x19”  
Stacktrace:  
[1] tryparse\_internal(#unused#::Type{Int64}, s::SubString{String}, startpos::Int64, endpos::Int64, base\_::Int64, raise::Bool)  
@ Base .\parse.jl:137  
[2] parse(::Type{Int64}, s::SubString{String}; base::Nothing)  
@ Base .\parse.jl:241  
[3] parse  
@ .\parse.jl:241 [inlined]  
[4] \_broadcast\_getindex\_evalf  
@ .\broadcast.jl:648 [inlined]  
[5] \_broadcast\_getindex  
@ .\broadcast.jl:631 [inlined]  
[6] getindex  
@ .\broadcast.jl:575 [inlined]  
[7] copy  
@ .\broadcast.jl:898 [inlined]  
[8] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0}, Nothing, typeof(parse), Tuple{Base.RefValue{Type{Int64}}, Base.RefValue{SubString{String}}}})  
@ Base.Broadcast .\broadcast.jl:883  
[9] top-level scope  
@ C:\Users\Armando.julia\packages\CPLEX\5NpoU\src\CPLEX.jl:22  
[10] include  
@ .\Base.jl:386 [inlined]  
[11] include\_package\_for\_output(pkg::Base.PkgId, input::String, depot\_path::Vector{String}, dl\_load\_path::Vector{String}, load\_path::Vector{String}, concrete\_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)  
@ Base .\loading.jl:1213  
[12] top-level scope  
@ none:1  
[13] eval  
@ .\boot.jl:360 [inlined]  
[14] eval(x::Expr)  
@ Base.MainInclude .\client.jl:446  
[15] top-level scope  
@ none:1  
in expression starting at C:\Users\Armando.julia\packages\CPLEX\5NpoU\src\CPLEX.jl:1  
ERROR: Failed to precompile CPLEX [a076750e-1247-5638-91d2-ce28b192dca0] to C:\Users\Armando.julia\compiled\v1.6\CPLEX\jl\_8B5E.tmp.  
Stacktrace:  
[1] error(s::String)  
@ Base .\error.jl:33  
[2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::Base.TTY, internal\_stdout::Base.TTY)  
@ Base .\loading.jl:1360  
[3] compilecache(pkg::Base.PkgId, path::String)  
@ Base .\loading.jl:1306  
[4] \_require(pkg::Base.PkgId)  
@ Base .\loading.jl:1021  
[5] require(uuidkey::Base.PkgId)  
@ Base .\loading.jl:914  
[6] require(into::Module, mod::Symbol)  
@ Base .\loading.jl:901  
[7] eval  
@ .\boot.jl:360 [inlined]  
[8] eval  
@ .\Base.jl:39 [inlined]  
[9] repleval(m::Module, code::Expr, #unused#::String)  
@ VSCodeServer c:\Users\Armando.vscode\extensions\julialang.language-julia-1.1.38\scripts\packages\VSCodeServer\src\repl.jl:124  
[10] (::VSCodeServer.var"#47#49"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()  
@ VSCodeServer c:\Users\Armando.vscode\extensions\julialang.language-julia-1.1.38\scripts\packages\VSCodeServer\src\repl.jl:99  
[11] with\_logstate(f::Function, logstate::Any)  
@ Base.CoreLogging .\logging.jl:491  
[12] with\_logger  
@ .\logging.jl:603 [inlined]  
[13] (::VSCodeServer.var"#46#48"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()  
@ VSCodeServer c:\Users\Armando.vscode\extensions\julialang.language-julia-1.1.38\scripts\packages\VSCodeServer\src\repl.jl:100  
[14] #invokelatest#2  
@ .\essentials.jl:708 [inlined]  
[15] invokelatest(::Any)  
@ Base .\essentials.jl:706  
[16] macro expansion  
@ c:\Users\Armando.vscode\extensions\julialang.language-julia-1.1.38\scripts\packages\VSCodeServer\src\eval.jl:34 [inlined]  
[17] (::VSCodeServer.var"#60#61")()  
@ VSCodeServer .\task.jl:411

julia\>

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [May 10, 2021, 5:31am UTC](https://discourse.julialang.org/t/cplex-julia-jump-connection-problem/60724/7 "2021-05-10T05:31:34Z")

</div>

For future readers, this was resolved on Github: [Installation Problem - CPLEX package on Julia · Issue #368 · jump-dev/CPLEX.jl · GitHub](https://github.com/jump-dev/CPLEX.jl/issues/368).
