GithubHelp home page GithubHelp logo

adventofcode.jl's Introduction

AdventOfCode.jl

Build Status codecov

Helper library for working with Advent of Code in Julia.

adventofcode.jl's People

Contributors

cmcaine avatar kescobo avatar kleinschmidt avatar sebrollen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

adventofcode.jl's Issues

Issue with setting up files

Hi, I get

> setup_files()

ERROR: HTTP.Exceptions.StatusError(500, "GET", "/2023/day/1/input", HTTP.Messages.Response:
"""
HTTP/1.1 500 Internal Server Error
Date: Fri, 01 Dec 2023 09:14:54 GMT
Content-Type: text/html; charset=iso-8859-1
Content-Length: 532
Connection: keep-alive
Server: Apache

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at 
 webmaster@localhost to inform them of the time this error occurred,
 and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
""")
Stacktrace:
  [1] (::HTTP.ConnectionRequest.var"#connections#4"{})(req::HTTP.Messages.Request; proxy::Nothing, socket_type::Type, socket_type_tls::Type, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@Kwargs{})
    @ HTTP.ConnectionRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/ConnectionRequest.jl:144
  [2] (::Base.var"#96#98"{})(args::HTTP.Messages.Request; kwargs::@Kwargs{})
    @ Base ./error.jl:308
  [3] (::HTTP.RetryRequest.var"#manageretries#3"{})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{})
    @ HTTP.RetryRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/RetryRequest.jl:75
  [4] manageretries
    @ HTTP.CookieRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/RetryRequest.jl:30 [inlined]
  [5] (::HTTP.CookieRequest.var"#managecookies#4"{})(req::HTTP.Messages.Request; cookies::Dict{…}, cookiejar::HTTP.Cookies.CookieJar, kw::@Kwargs{})
    @ HTTP.CookieRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/CookieRequest.jl:42
  [6] managecookies
    @ HTTP.HeadersRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/CookieRequest.jl:19 [inlined]
  [7] (::HTTP.HeadersRequest.var"#defaultheaders#2"{})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{})
    @ HTTP.HeadersRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/HeadersRequest.jl:71
  [8] defaultheaders
    @ HTTP.RedirectRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/HeadersRequest.jl:14 [inlined]
  [9] (::HTTP.RedirectRequest.var"#redirects#3"{})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{})
    @ HTTP.RedirectRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/RedirectRequest.jl:25
 [10] redirects
    @ HTTP.MessageRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/RedirectRequest.jl:14 [inlined]
 [11] (::HTTP.MessageRequest.var"#makerequest#3"{})(method::String, url::URIs.URI, headers::Nothing, body::Vector{…}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@Kwargs{})
    @ HTTP.MessageRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/MessageRequest.jl:35
 [12] makerequest
    @ HTTP ~/.julia/packages/HTTP/bDoga/src/clientlayers/MessageRequest.jl:24 [inlined]
 [13] request(stack::HTTP.MessageRequest.var"#makerequest#3"{}, method::String, url::String, h::Nothing, b::Vector{…}, q::Nothing; headers::Nothing, body::Vector{…}, query::Nothing, kw::@Kwargs{})
    @ HTTP ~/.julia/packages/HTTP/bDoga/src/HTTP.jl:457
 [14] #request#20
    @ HTTP ~/.julia/packages/HTTP/bDoga/src/HTTP.jl:315 [inlined]
 [15] get
    @ AdventOfCode ~/.julia/packages/HTTP/bDoga/src/HTTP.jl:518 [inlined]
 [16] macro expansion
    @ AdventOfCode ~/.julia/packages/Mocking/Q17aB/src/mock.jl:29 [inlined]
 [17] _download_data(year::Int64, day::Int64)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/M4TX3/src/AdventOfCode.jl:17
 [18] _setup_data_file(year::Int64, day::Int64; include_year::Bool)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/M4TX3/src/AdventOfCode.jl:55
 [19] _setup_data_file
    @ AdventOfCode ~/.julia/packages/AdventOfCode/M4TX3/src/AdventOfCode.jl:45 [inlined]
 [20] setup_files(year::Int64, day::Int64; force::Bool, include_year::Bool)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/M4TX3/src/AdventOfCode.jl:93
 [21] setup_files
    @ AdventOfCode ~/.julia/packages/AdventOfCode/M4TX3/src/AdventOfCode.jl:88 [inlined]
 [22] setup_files(; force::Bool, include_year::Bool)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/M4TX3/src/AdventOfCode.jl:105
 [23] top-level scope
    @ REPL[2]:1

caused by: HTTP.Exceptions.StatusError(500, "GET", "/2023/day/1/input", HTTP.Messages.Response:
"""
HTTP/1.1 500 Internal Server Error
Date: Fri, 01 Dec 2023 09:14:54 GMT
Content-Type: text/html; charset=iso-8859-1
Content-Length: 532
Connection: keep-alive
Server: Apache

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at 
 webmaster@localhost to inform them of the time this error occurred,
 and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
""")
Stacktrace:
  [1] (::HTTP.ExceptionRequest.var"#exceptions#2"{})(stream::HTTP.Streams.Stream{…}; status_exception::Bool, timedout::Nothing, logerrors::Bool, logtag::Nothing, kw::@Kwargs{})
    @ HTTP.ExceptionRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/ExceptionRequest.jl:19
  [2] exceptions
    @ HTTP.TimeoutRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/ExceptionRequest.jl:13 [inlined]
  [3] (::HTTP.TimeoutRequest.var"#timeouts#3"{})(stream::HTTP.Streams.Stream{…}; readtimeout::Int64, logerrors::Bool, logtag::Nothing, kw::@Kwargs{})
    @ HTTP.TimeoutRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/TimeoutRequest.jl:18
  [4] (::HTTP.ConnectionRequest.var"#connections#4"{})(req::HTTP.Messages.Request; proxy::Nothing, socket_type::Type, socket_type_tls::Type, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@Kwargs{})
    @ HTTP.ConnectionRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/ConnectionRequest.jl:120
  [5] (::Base.var"#96#98"{})(args::HTTP.Messages.Request; kwargs::@Kwargs{})
    @ Base ./error.jl:308
  [6] (::HTTP.RetryRequest.var"#manageretries#3"{})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{})
    @ HTTP.RetryRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/RetryRequest.jl:75
  [7] manageretries
    @ HTTP.CookieRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/RetryRequest.jl:30 [inlined]
  [8] (::HTTP.CookieRequest.var"#managecookies#4"{})(req::HTTP.Messages.Request; cookies::Dict{…}, cookiejar::HTTP.Cookies.CookieJar, kw::@Kwargs{})
    @ HTTP.CookieRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/CookieRequest.jl:42
  [9] managecookies
    @ HTTP.HeadersRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/CookieRequest.jl:19 [inlined]
 [10] (::HTTP.HeadersRequest.var"#defaultheaders#2"{})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{})
    @ HTTP.HeadersRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/HeadersRequest.jl:71
 [11] defaultheaders
    @ HTTP.RedirectRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/HeadersRequest.jl:14 [inlined]
 [12] (::HTTP.RedirectRequest.var"#redirects#3"{})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{})
    @ HTTP.RedirectRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/RedirectRequest.jl:25
 [13] redirects
    @ HTTP.MessageRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/RedirectRequest.jl:14 [inlined]
 [14] (::HTTP.MessageRequest.var"#makerequest#3"{})(method::String, url::URIs.URI, headers::Nothing, body::Vector{…}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@Kwargs{})
    @ HTTP.MessageRequest ~/.julia/packages/HTTP/bDoga/src/clientlayers/MessageRequest.jl:35
 [15] makerequest
    @ HTTP ~/.julia/packages/HTTP/bDoga/src/clientlayers/MessageRequest.jl:24 [inlined]
 [16] request(stack::HTTP.MessageRequest.var"#makerequest#3"{}, method::String, url::String, h::Nothing, b::Vector{…}, q::Nothing; headers::Nothing, body::Vector{…}, query::Nothing, kw::@Kwargs{})
    @ HTTP ~/.julia/packages/HTTP/bDoga/src/HTTP.jl:457
 [17] #request#20
    @ HTTP ~/.julia/packages/HTTP/bDoga/src/HTTP.jl:315 [inlined]
 [18] get
    @ AdventOfCode ~/.julia/packages/HTTP/bDoga/src/HTTP.jl:518 [inlined]
 [19] macro expansion
    @ AdventOfCode ~/.julia/packages/Mocking/Q17aB/src/mock.jl:29 [inlined]
 [20] _download_data(year::Int64, day::Int64)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/M4TX3/src/AdventOfCode.jl:17
 [21] _setup_data_file(year::Int64, day::Int64; include_year::Bool)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/M4TX3/src/AdventOfCode.jl:55
 [22] _setup_data_file
    @ AdventOfCode ~/.julia/packages/AdventOfCode/M4TX3/src/AdventOfCode.jl:45 [inlined]
 [23] setup_files(year::Int64, day::Int64; force::Bool, include_year::Bool)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/M4TX3/src/AdventOfCode.jl:93
 [24] setup_files
    @ AdventOfCode ~/.julia/packages/AdventOfCode/M4TX3/src/AdventOfCode.jl:88 [inlined]
 [25] setup_files(; force::Bool, include_year::Bool)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/M4TX3/src/AdventOfCode.jl:105
 [26] top-level scope
    @ REPL[2]:1
Some type information was truncated. Use `show(err)` to see complete types.

Not sure whether this is due to the web site or an issue here.

logon issue

Did something happen to the authentication? This package has worked for me for the last two years

julia> setup_files()
ERROR: HTTP.ExceptionRequest.StatusError(400, "GET", "/2021/day/1/input", HTTP.Messages.Response:
"""
HTTP/1.1 400 Bad Request
Date: Wed, 01 Dec 2021 08:05:22 GMT
Content-Type: text/plain
Transfer-Encoding: chunked
Connection: keep-alive
Server: Apache
Server-Ip: 172.31.16.87
Set-Cookie: session=; Domain=.adventofcode.com; Expires=Thu, 01-Jan-1970 00:00:00 GMT; Path=/; HttpOnly; Secure
Strict-Transport-Security: max-age=300

Puzzle inputs differ by user.  Please log in to get your puzzle input.
""")
Stacktrace:
  [1] request(::Type{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}, ::HTTP.URIs.URI, ::Vararg{Any}; kw::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
    @ HTTP.ExceptionRequest ~/.julia/packages/HTTP/IAI92/src/ExceptionRequest.jl:22
  [2] (::Base.var"#76#78"{Base.var"#76#77#79"{ExponentialBackOff, HTTP.RetryRequest.var"#2#3"{Bool, HTTP.Messages.Request}, typeof(HTTP.request)}})(::Type, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
    @ Base ./error.jl:294
  [3] #request#1
    @ ~/.julia/packages/HTTP/IAI92/src/RetryRequest.jl:44 [inlined]
  [4] request(::Type{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}, method::String, url::HTTP.URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; http_version::VersionNumber, target::String, parent::Nothing, iofunction::Nothing, kw::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:reached_redirect_limit,), Tuple{Bool}}})
    @ HTTP.MessageRequest ~/.julia/packages/HTTP/IAI92/src/MessageRequest.jl:51
  [5] request(::Type{HTTP.CookieRequest.CookieLayer{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}}, method::String, url::HTTP.URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; cookies::Dict{String, String}, cookiejar::Dict{String, Set{HTTP.Cookies.Cookie}}, kw::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:reached_redirect_limit,), Tuple{Bool}}})
    @ HTTP.CookieRequest ~/.julia/packages/HTTP/IAI92/src/CookieRequest.jl:44
  [6] request(::Type{HTTP.BasicAuthRequest.BasicAuthLayer{HTTP.CookieRequest.CookieLayer{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}}}, method::String, url::HTTP.URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; kw::Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:reached_redirect_limit, :cookies), Tuple{Bool, Dict{String, String}}}})
    @ HTTP.BasicAuthRequest ~/.julia/packages/HTTP/IAI92/src/BasicAuthRequest.jl:28
  [7] request(::Type{HTTP.RedirectRequest.RedirectLayer{HTTP.BasicAuthRequest.BasicAuthLayer{HTTP.CookieRequest.CookieLayer{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}}}}, method::String, url::HTTP.URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; redirect_limit::Int64, forwardheaders::Bool, kw::Base.Pairs{Symbol, Dict{String, String}, Tuple{Symbol}, NamedTuple{(:cookies,), Tuple{Dict{String, String}}}})
    @ HTTP.RedirectRequest ~/.julia/packages/HTTP/IAI92/src/RedirectRequest.jl:24
  [8] request(method::String, url::String, h::Vector{Pair{SubString{String}, SubString{String}}}, b::Vector{UInt8}; headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}, query::Nothing, kw::Base.Pairs{Symbol, Dict{String, String}, Tuple{Symbol}, NamedTuple{(:cookies,), Tuple{Dict{String, String}}}})
    @ HTTP ~/.julia/packages/HTTP/IAI92/src/HTTP.jl:314
  [9] #get#12
    @ ~/.julia/packages/HTTP/IAI92/src/HTTP.jl:391 [inlined]
 [10] macro expansion
    @ ~/.julia/packages/Mocking/MsKoy/src/mock.jl:29 [inlined]
 [11] _download_data(year::Int64, day::Int64)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/DkLCV/src/AdventOfCode.jl:17
 [12] _setup_data_file(year::Int64, day::Int64; include_year::Bool)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/DkLCV/src/AdventOfCode.jl:59
 [13] setup_files(year::Int64, day::Int64; force::Bool, include_year::Bool)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/DkLCV/src/AdventOfCode.jl:97
 [14] setup_files(; force::Bool, include_year::Bool)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/DkLCV/src/AdventOfCode.jl:109
 [15] setup_files()
    @ AdventOfCode ~/.julia/packages/AdventOfCode/DkLCV/src/AdventOfCode.jl:109
 [16] top-level scope
    @ REPL[10]:1

julia> haskey(ENV, "AOC_SESSION")
true

Allow for different years in different repos

The current default setup appears to be:

- advent
  - src
    - year1
    - year2
  - data
    - year1
    - year2

I much prefer

- advent
  - year1
    - src
    - data
  - year2
    - src
    - data

Are you willing to make this structure optional? Simplest would be to just have an option to omit the year from the path entirely, and leave the higher structure to the user. I'd be happy to make a PR

Down website not handled correctly

The website is currently down:
Screen Shot 2023-02-23 at 19 33 19

Running the package at this time leads to the input file being the HTML of the website down page:
`

<title>Advent of Code</title><style>body { background: #0f0f23; color: #cccccc; font-family: "Source Code Pro", monospace; font-size: 14pt; } #message { text-align: center; position: fixed; top: 50%; margin-top: -1.9em; white-space: pre; width: 100%; }</style>
.----------------------. | We'll be right back! | '----------------------'
` A case to handle, return an error perhaps?

unqualified closewrite causes setup_files to error

I get

julia> setup_files()
WARNING: both IOExtras and Base export "closewrite"; uses of it in module StreamRequest must be qualified
WARNING: both IOExtras and Base export "closewrite"; uses of it in module ConnectionPool must be qualified
ERROR: UndefVarError: closewrite not defined
Stacktrace:
  [1] request(::Type{HTTP.StreamRequest.StreamLayer{Union{}}}, io::HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}, req::HTTP.Messages.Request, body::Vector{UInt8}; reached_redirect_limit::Bool, response_stream::Nothing, iofunction::Nothing, verbose::Int64, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ HTTP.StreamRequest ~/.julia/packages/HTTP/IAI92/src/StreamRequest.jl:83
  [2] request(::Type{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}, url::HTTP.URIs.URI, req::HTTP.Messages.Request, body::Vector{UInt8}; proxy::Nothing, socket_type::Type, reuse_limit::Int64, kw::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
    @ HTTP.ConnectionRequest ~/.julia/packages/HTTP/IAI92/src/ConnectionRequest.jl:96
  [3] request(::Type{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}, ::HTTP.URIs.URI, ::Vararg{Any}; kw::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
    @ HTTP.ExceptionRequest ~/.julia/packages/HTTP/IAI92/src/ExceptionRequest.jl:19
  [4] (::Base.var"#88#90"{Base.var"#88#89#91"{ExponentialBackOff, HTTP.RetryRequest.var"#2#3"{Bool, HTTP.Messages.Request}, typeof(HTTP.request)}})(::Type, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
    @ Base ./error.jl:296
  [5] #request#1
    @ ~/.julia/packages/HTTP/IAI92/src/RetryRequest.jl:44 [inlined]
  [6] request(::Type{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}, method::String, url::HTTP.URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; http_version::VersionNumber, target::String, parent::Nothing, iofunction::Nothing, kw::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:reached_redirect_limit,), Tuple{Bool}}})
    @ HTTP.MessageRequest ~/.julia/packages/HTTP/IAI92/src/MessageRequest.jl:51
  [7] request(::Type{HTTP.BasicAuthRequest.BasicAuthLayer{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}}, method::String, url::HTTP.URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; kw::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:reached_redirect_limit,), Tuple{Bool}}})
    @ HTTP.BasicAuthRequest ~/.julia/packages/HTTP/IAI92/src/BasicAuthRequest.jl:28
  [8] request(::Type{HTTP.RedirectRequest.RedirectLayer{HTTP.BasicAuthRequest.BasicAuthLayer{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}}}, method::String, url::HTTP.URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; redirect_limit::Int64, forwardheaders::Bool, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ HTTP.RedirectRequest ~/.julia/packages/HTTP/IAI92/src/RedirectRequest.jl:24
  [9] request(::Type{HTTP.RedirectRequest.RedirectLayer{HTTP.BasicAuthRequest.BasicAuthLayer{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}}}, method::String, url::HTTP.URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8})
    @ HTTP.RedirectRequest ~/.julia/packages/HTTP/IAI92/src/RedirectRequest.jl:18
 [10] request(method::String, url::String, h::Vector{Pair{SubString{String}, SubString{String}}}, b::Vector{UInt8}; headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}, query::Nothing, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ HTTP ~/.julia/packages/HTTP/IAI92/src/HTTP.jl:314
 [11] request (repeats 2 times)
    @ ~/.julia/packages/HTTP/IAI92/src/HTTP.jl:312 [inlined]
 [12] #get#12
    @ ~/.julia/packages/HTTP/IAI92/src/HTTP.jl:391 [inlined]
 [13] get
    @ ~/.julia/packages/HTTP/IAI92/src/HTTP.jl:391 [inlined]
 [14] _is_unlocked(year::Int64, day::Int64)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/DkLCV/src/AdventOfCode.jl:68
 [15] setup_files(year::Int64, day::Int64; force::Bool, include_year::Bool)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/DkLCV/src/AdventOfCode.jl:93
 [16] setup_files(; force::Bool, include_year::Bool)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/DkLCV/src/AdventOfCode.jl:109
 [17] setup_files()
    @ AdventOfCode ~/.julia/packages/AdventOfCode/DkLCV/src/AdventOfCode.jl:109
 [18] top-level scope
    @ REPL[4]:1

caused by: EOFError: read end of file
Stacktrace:
  [1] read_to_buffer(t::HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}, sizehint::Int64)
    @ HTTP.ConnectionPool ~/.julia/packages/HTTP/IAI92/src/ConnectionPool.jl:252
  [2] readuntil(t::HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}, f::Function, sizehint::Int64)
    @ HTTP.ConnectionPool ~/.julia/packages/HTTP/IAI92/src/ConnectionPool.jl:271
  [3] readuntil
    @ ~/.julia/packages/HTTP/IAI92/src/ConnectionPool.jl:269 [inlined]
  [4] readheaders
    @ ~/.julia/packages/HTTP/IAI92/src/Messages.jl:471 [inlined]
  [5] startread(http::HTTP.Streams.Stream{HTTP.Messages.Response, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}})
    @ HTTP.Streams ~/.julia/packages/HTTP/IAI92/src/Streams.jl:155
  [6] macro expansion
    @ ~/.julia/packages/HTTP/IAI92/src/StreamRequest.jl:67 [inlined]
  [7] macro expansion
    @ ./task.jl:454 [inlined]
  [8] request(::Type{HTTP.StreamRequest.StreamLayer{Union{}}}, io::HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}, req::HTTP.Messages.Request, body::Vector{UInt8}; reached_redirect_limit::Bool, response_stream::Nothing, iofunction::Nothing, verbose::Int64, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ HTTP.StreamRequest ~/.julia/packages/HTTP/IAI92/src/StreamRequest.jl:57
  [9] request(::Type{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}, url::HTTP.URIs.URI, req::HTTP.Messages.Request, body::Vector{UInt8}; proxy::Nothing, socket_type::Type, reuse_limit::Int64, kw::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
    @ HTTP.ConnectionRequest ~/.julia/packages/HTTP/IAI92/src/ConnectionRequest.jl:96
 [10] request(::Type{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}, ::HTTP.URIs.URI, ::Vararg{Any}; kw::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
    @ HTTP.ExceptionRequest ~/.julia/packages/HTTP/IAI92/src/ExceptionRequest.jl:19
 [11] (::Base.var"#88#90"{Base.var"#88#89#91"{ExponentialBackOff, HTTP.RetryRequest.var"#2#3"{Bool, HTTP.Messages.Request}, typeof(HTTP.request)}})(::Type, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
    @ Base ./error.jl:296
 [12] #request#1
    @ ~/.julia/packages/HTTP/IAI92/src/RetryRequest.jl:44 [inlined]
 [13] request(::Type{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}, method::String, url::HTTP.URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; http_version::VersionNumber, target::String, parent::Nothing, iofunction::Nothing, kw::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:reached_redirect_limit,), Tuple{Bool}}})
    @ HTTP.MessageRequest ~/.julia/packages/HTTP/IAI92/src/MessageRequest.jl:51
 [14] request(::Type{HTTP.BasicAuthRequest.BasicAuthLayer{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}}, method::String, url::HTTP.URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; kw::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:reached_redirect_limit,), Tuple{Bool}}})
    @ HTTP.BasicAuthRequest ~/.julia/packages/HTTP/IAI92/src/BasicAuthRequest.jl:28
 [15] request(::Type{HTTP.RedirectRequest.RedirectLayer{HTTP.BasicAuthRequest.BasicAuthLayer{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}}}, method::String, url::HTTP.URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; redirect_limit::Int64, forwardheaders::Bool, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ HTTP.RedirectRequest ~/.julia/packages/HTTP/IAI92/src/RedirectRequest.jl:24
 [16] request(::Type{HTTP.RedirectRequest.RedirectLayer{HTTP.BasicAuthRequest.BasicAuthLayer{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}}}, method::String, url::HTTP.URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8})
    @ HTTP.RedirectRequest ~/.julia/packages/HTTP/IAI92/src/RedirectRequest.jl:18
 [17] request(method::String, url::String, h::Vector{Pair{SubString{String}, SubString{String}}}, b::Vector{UInt8}; headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}, query::Nothing, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ HTTP ~/.julia/packages/HTTP/IAI92/src/HTTP.jl:314
 [18] request (repeats 2 times)
    @ ~/.julia/packages/HTTP/IAI92/src/HTTP.jl:312 [inlined]
 [19] #get#12
    @ ~/.julia/packages/HTTP/IAI92/src/HTTP.jl:391 [inlined]
 [20] get
    @ ~/.julia/packages/HTTP/IAI92/src/HTTP.jl:391 [inlined]
 [21] _is_unlocked(year::Int64, day::Int64)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/DkLCV/src/AdventOfCode.jl:68
 [22] setup_files(year::Int64, day::Int64; force::Bool, include_year::Bool)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/DkLCV/src/AdventOfCode.jl:93
 [23] setup_files(; force::Bool, include_year::Bool)
    @ AdventOfCode ~/.julia/packages/AdventOfCode/DkLCV/src/AdventOfCode.jl:109
 [24] setup_files()
    @ AdventOfCode ~/.julia/packages/AdventOfCode/DkLCV/src/AdventOfCode.jl:109
 [25] top-level scope
    @ REPL[4]:1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.