zlisto / Daily-Fantasy-Baseball-Contests-in-DraftKings

This is the code for constructing a portfolio of lineups for DraftKings baseball contests with a top heavy payoff structure. This code is based on the paper Picking Winners Using Integer Programming by David Hunter, Juan Pablo Vielma, and Tauhid Zaman (https://arxiv.org/abs/1604.01455).
37 stars 27 forks source link

Error when running real data #12

Open memorableusename44 opened 5 years ago

memorableusename44 commented 5 years ago

I had the program running with the test data that was given. When I tried to apply real data, I get this error. I've matched the all of the new data variables to the given data, and I can't figure out why it won't run. Any advice/help would be much appreciated. Thanks.

ERROR: LoadError: MethodError: no method matching parse(::Int64) Closest candidates are: parse(::Type{IPv4}, ::AbstractString) at socket.jl:167 parse(::Type{IPv6}, ::AbstractString) at socket.jl:218 parse(::Type{DateTime}, ::AbstractString, ::DateFormat{Symbol("yyyy-mm-dd\THH:MM:SS.s"),Tuple{Base.Dates.DatePart{'y'},Base.Dates.Delim{Char,1},Base.Dates.DatePart{'m'},Base.Dates.Delim{Char,1},Base.Dates.DatePart{'d'},Base.Dates.Delim{Char,1},Base.Dates.DatePart{'H'},Base.Dates.Delim{Char,1},Base.Dates.DatePart{'M'},Base.Dates.Delim{Char,1},Base.Dates.DatePart{'S'},Base.Dates.Delim{Char,1},Base.Dates.DatePart{'s'}}}) at dates\parse.jl:202 ... Stacktrace: [1] clean_order(::Array{Union{Int64, Missings.Missing},1}) at C:\Users\vince\Desktop\Real-FBP\data_cleaning.jl:13 [2] read_player_data(::String, ::String) at C:\Users\vince\Desktop\Real-FBP\data_cleaning.jl:63 [3] create_lineups(::Int64, ::Int64, ::Int64, ::#baseball_formulation, ::String, ::String, ::String) at C:\Users\vince\Desktop\Real-FBP\data_cleaning.jl:198 [4] include_from_node1(::String) at .\loading.jl:576 [5] include(::String) at .\sysimg.jl:14 while loading C:\Users\vince\Desktop\Real-FBP\optimize_multiple_lineups_baseball.jl, in expression starting on line 44

amacleay commented 5 years ago

Could you post the output of julia -e 'Pkg.status()'?

ty-fleming commented 4 years ago

Im getting this same error. Were you able to fix it? @memorableusename44

memorableusename44 commented 4 years ago

The script is expecting at least one of the hitters to not be in a batting order. In other words, there needs to be at least one hitter with "x" listed in the "Batting order (confirmed)" column. I got around the issue by creating a dummy row with NaN and 0 values except for the batting order set to "x".

On 07/31/2020 12:19 PM ty7466 <notifications@github.com> wrote:

Im getting this same error. Were you able to fix it? @memorableusename44 https://github.com/memorableusename44

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/zlisto/Daily-Fantasy-Baseball-Contests-in-DraftKings/issues/12#issuecomment-667209145 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AM5ERZQJI27B6PTDZHRSJE3R6LVK5ANCNFSM4IMAJ4RQ .