GLM.jl module : 1 test failed


Hello, any idea what I did wrong here? (I have julia version 0.6.2, and latest GLM.jl package). I was running

~/repos/git/GLM.jl/test$ julia runtests.jl

and got

WARNING: Method definition ==(Base.Nullable{S}, Base.Nullable{T}) in module Base at nullable.jl:238 overwritten in module NullableArrays at /home/hungngo/.julia/v0.6/NullableArrays/src/operators.jl:99.
WARNING: ccdf(d::UnivariateDistribution, X::AbstractArray) is deprecated, use ccdf.(d, X) instead.
 [1] depwarn(::String, ::Symbol) at ./deprecated.jl:70
 [2] ccdf(::Distributions.FDist{Float64}, ::Array{Float64,1}) at ./deprecated.jl:57
 [3] coeftable(::GLM.LinearModel{GLM.LmResp{Array{Float64,1}},GLM.DensePredChol{Float64,Base.LinAlg.Cholesky{Float64,Array{Float64,2}}}}) at /home/hungngo/.julia/v0.6/GLM/src/lm.jl:154
 [4] coeftable(::DataFrames.DataFrameRegressionModel{GLM.LinearModel{GLM.LmResp{Array{Float64,1}},GLM.DensePredChol{Float64,Base.LinAlg.Cholesky{Float64,Array{Float64,2}}}},Array{Float64,2}}) at /home/hungngo/.julia/v0.6/DataFrames/src/statsmodels/statsmodel.jl:93
 [5] show(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::DataFrames.DataFrameRegressionModel{GLM.LinearModel{GLM.LmResp{Array{Float64,1}},GLM.DensePredChol{Float64,Base.LinAlg.Cholesky{Float64,Array{Float64,2}}}},Array{Float64,2}}) at /home/hungngo/.julia/v0.6/DataFrames/src/statsmodels/statsmodel.jl:104
 [6] test_show(::DataFrames.DataFrameRegressionModel{GLM.LinearModel{GLM.LmResp{Array{Float64,1}},GLM.DensePredChol{Float64,Base.LinAlg.Cholesky{Float64,Array{Float64,2}}}},Array{Float64,2}}) at /home/hungngo/repos/git/GLM.jl/test/runtests.jl:5
 [7] macro expansion at /home/hungngo/repos/git/GLM.jl/test/runtests.jl:15 [inlined]
 [8] macro expansion at ./test.jl:860 [inlined]
 [9] anonymous at ./<missing>:?
 [10] include_from_node1(::String) at ./loading.jl:576
 [11] include(::String) at ./sysimg.jl:14
 [12] process_options(::Base.JLOptions) at ./client.jl:305
 [13] _start() at ./client.jl:371
while loading /home/hungngo/repos/git/GLM.jl/test/runtests.jl, in expression starting on line 13
lm: Error During Test
  Got an exception of type MethodError outside of a @test
  MethodError: no method matching fit(::Type{GLM.LinearModel}, ::Array{Float64,2}, ::Array{Float64,1}, ::Bool)
  Closest candidates are:
    fit(!Matched::Type{StatsBase.Histogram}, ::Any...; kwargs...) at /home/hungngo/.julia/v0.6/StatsBase/src/hist.jl:339
    fit(!Matched::StatsBase.StatisticalModel, ::Any...) at /home/hungngo/.julia/v0.6/StatsBase/src/statmodels.jl:99
    fit(!Matched::Type{D<:Distributions.Distribution}, ::Any...) where D<:Distributions.Distribution at /home/hungngo/.julia/v0.6/Distributions/src/genericfit.jl:34
   [1] macro expansion at /home/hungngo/repos/git/GLM.jl/test/runtests.jl:33 [inlined]
   [2] macro expansion at ./test.jl:860 [inlined]
   [3] anonymous at ./<missing>:?
   [4] include_from_node1(::String) at ./loading.jl:576
   [5] include(::String) at ./sysimg.jl:14
   [6] process_options(::Base.JLOptions) at ./client.jl:305
   [7] _start() at ./client.jl:371
Test Summary: | Pass  Error  Total
lm            |   15      1     16
ERROR: LoadError: Some tests did not pass: 15 passed, 0 failed, 1 errored, 0 broken.

At the same time, if Pkg.test("GLM") is run then all tests passed, but only 15 tests were run for the lm portion instead of 16. So I suppose the error above is a known error?


Can you define “latest”? It does seem you’re using an old GLM.jl version. See How to upgrade from DataFrames 0.10.1 to 0.11.3?


Thank you @nalimilan, that solved my problem. FWIW, the issue was the following

  • I have Gladfly package installed, which downgrades a bunch of other packages
INFO: Downgrading CSV: v0.2.4 => v0.1.5
INFO: Downgrading CategoricalArrays: v0.3.9 => v0.1.6
INFO: Downgrading DataFrames: v0.11.6 => v0.10.1
INFO: Downgrading DataStreams: v0.3.4 => v0.1.3
INFO: Downgrading GLM: v0.10.1 => v0.8.1
  • So even after running Pkg.update(), DataFrames and GLM are not updated to the latest versions, causing some of the GLM.jl's tests to fail.
  • After removing Gladfly, all tests passed as expected.

Followup Question: is there a principled way of detecting such problems to avoid wasting half a day tracing down latest version numbers?


Not really at the moment. But see How to find package preventing others from updating.