Daily-Fantasy-Baseball-Contests-in-DraftKings icon indicating copy to clipboard operation
Daily-Fantasy-Baseball-Contests-in-DraftKings copied to clipboard

Problem running the code. MethodError: no method matching sum(::GenericAffExpr{Float64,VariableRef}; i=1:616)

Open vmactuarial opened this issue 3 years ago • 0 comments

When I run the code optimize_multiple_lineups_baseball.jl I get the following error:

MethodError: no method matching sum(::GenericAffExpr{Float64,VariableRef}; i=1:616) Closest candidates are: sum(::Any) at reduce.jl:511 got unsupported keyword argument "i" sum(::Any, !Matched::StaticArrays.StaticArray{var"#s171",T,N} where N where var"#s171"<:Tuple; dims) where T at C:\Users\VM.julia\packages\StaticArrays\l7lu2\src\mapreduce.jl:251 got unsupported keyword argument "i" sum(::Any, !Matched::AbstractArray; dims) at reducedim.jl:723 got unsupported keyword argument "i" ... macro expansion at rewrite.jl:227 [inlined] macro expansion at macros.jl:830 [inlined] baseball_formulation(::DataFrame, ::Array{Int64,2}, ::Int64, ::Int64, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Int64,2}, ::Array{Int64,2}, ::Array{Int64,2}, ::Array{Int64,2}) at baseball_formulations3.jl:64 create_lineups(::Int64, ::Int64, ::Int64, ::typeof(baseball_formulation), ::String, ::String, ::String) at data_cleaning3.jl:434 top-level scope at optimize_multiple_lineups_baseball3.jl:75 include_string(::Function, ::Module, ::String, ::String) at loading.jl:1088

I would greatly appreciate your help to move forward

Greetings

vmactuarial avatar Sep 27 '20 23:09 vmactuarial