gher-uliege / DIVAnd.jl

DIVAnd performs an n-dimensional variational analysis of arbitrarily located observations
GNU General Public License v2.0
72 stars 11 forks source link

Test "test_vocab.jl" fails #112

Closed ctroupin closed 1 year ago

ctroupin commented 1 year ago

Issue to get the metadata from the Vocab server.

Julia version

1.8.3

Packages

(@v1.8) pkg> st
Status `~/.julia/environments/v1.8/Project.toml`
  [efc8151c] DIVAnd v2.7.9
⌃ [864edb3b] DataStructures v0.17.20
  [5789e2e9] FileIO v1.16.0
  [61d90e0f] GeoJSON v0.6.2
  [c27321d9] Glob v1.3.0
⌅ [cd3eb016] HTTP v0.8.19
  [7073ff75] IJulia v1.23.3
  [033835bb] JLD2 v0.4.28
  [682c06a0] JSON v0.21.3
⌃ [85f8d34a] NCDatasets v0.10.4
  [3725be50] PhysOcean v0.6.6
⌃ [c3e4b0f8] Pluto v0.14.7
  [647866c9] PolygonOps v0.1.2
  [438e738f] PyCall v1.94.1
  [d330b81b] PyPlot v2.11.0
  [2913bbd2] StatsBase v0.33.21

Error message

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
DIVAnd: Error During Test at /home/ctroupin/.julia/packages/DIVAnd/MV3j9/test/runtests.jl:12
  Got exception outside of a @test
  LoadError: 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] DIVAnd.Vocab.CFVocab(; url::String)
      @ DIVAnd.Vocab ~/.julia/packages/DIVAnd/MV3j9/src/Vocab.jl:53
   [15] DIVAnd.Vocab.CFVocab()
      @ DIVAnd.Vocab ~/.julia/packages/DIVAnd/MV3j9/src/Vocab.jl:52
   [16] top-level scope
      @ ~/.julia/packages/DIVAnd/MV3j9/test/test_vocab.jl:7
   [17] include(fname::String)
      @ Base.MainInclude ./client.jl:476
   [18] macro expansion
      @ ~/.julia/packages/DIVAnd/MV3j9/test/runtests.jl:82 [inlined]
   [19] macro expansion
      @ ~/Software/julia-1.8.3/share/julia/stdlib/v1.8/Test/src/Test.jl:1360 [inlined]
   [20] top-level scope
      @ ~/.julia/packages/DIVAnd/MV3j9/test/runtests.jl:13
   [21] include(fname::String)
      @ Base.MainInclude ./client.jl:476
   [22] top-level scope
      @ none:6
   [23] eval
      @ ./boot.jl:368 [inlined]
   [24] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:276
   [25] _start()
      @ Base ./client.jl:522
  in expression starting at /home/ctroupin/.julia/packages/DIVAnd/MV3j9/test/test_vocab.jl:7

  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] DIVAnd.Vocab.CFVocab(; url::String)
      @ DIVAnd.Vocab ~/.julia/packages/DIVAnd/MV3j9/src/Vocab.jl:53
   [22] DIVAnd.Vocab.CFVocab()
      @ DIVAnd.Vocab ~/.julia/packages/DIVAnd/MV3j9/src/Vocab.jl:52
   [23] top-level scope
      @ ~/.julia/packages/DIVAnd/MV3j9/test/test_vocab.jl:7
   [24] include(fname::String)
      @ Base.MainInclude ./client.jl:476
   [25] macro expansion
      @ ~/.julia/packages/DIVAnd/MV3j9/test/runtests.jl:82 [inlined]
   [26] macro expansion
      @ ~/Software/julia-1.8.3/share/julia/stdlib/v1.8/Test/src/Test.jl:1360 [inlined]
   [27] top-level scope
      @ ~/.julia/packages/DIVAnd/MV3j9/test/runtests.jl:13
   [28] include(fname::String)
      @ Base.MainInclude ./client.jl:476
   [29] top-level scope
      @ none:6
   [30] eval
      @ ./boot.jl:368 [inlined]
   [31] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:276
   [32] _start()
      @ Base ./client.jl:522
Test Summary: | Pass  Error  Total     Time
DIVAnd        |  244      1    245  3m19.2s
ERROR: LoadError: Some tests did not pass: 244 passed, 0 failed, 1 errored, 0 broken.
in expression starting at /home/ctroupin/.julia/packages/DIVAnd/MV3j9/test/runtests.jl:12
ERROR: Package DIVAnd errored during testing
ctroupin commented 1 year ago

Working an another machine with the same configuration so seems to be related to HTTP package version (https://discourse.julialang.org/t/http-request-closewrite/86583).

Alexander-Barth commented 1 year ago

Thanks for the info! I just made version 1 or later of HTTP.jl now mandatory