@chain throws an error that I cannot understand. Please help. Thanks!
Code and error below:
julia> a = DataFrame(x=1:10, y=2:11)
10×2 DataFrame
Row │ x y
│ Int64 Int64
─────┼──────────────
1 │ 1 2
2 │ 2 3
3 │ 3 4
4 │ 4 5
5 │ 5 6
6 │ 6 7
7 │ 7 8
8 │ 8 9
9 │ 9 10
10 │ 10 11
julia> @chain a begin
_
end
ERROR: LoadError: LoadError: MethodError: findall(::Chain.var"#1#2", ::Vector{Any}) is ambiguous. Candidates:
findall(el::T, cont::Array{T, N} where N; returnTuple) where T in BetaML.Utils at /Users/rgoyal/.julia/packages/BetaML/cpTAz/src/Utils/Processing.jl:137
findall(testf::Function, A) in Base at array.jl:2153
Possible fix, define
findall(::T, ::Array{T, N} where N) where T<:Function
Stacktrace:
[1] reconvert_docstrings!(args::Vector{Any})
@ Chain ~/.julia/packages/Chain/h1xOi/src/Chain.jl:210
[2] rewrite_chain_block(block::Expr)
@ Chain ~/.julia/packages/Chain/h1xOi/src/Chain.jl:178
[3] rewrite_chain_block(firstpart::Symbol, block::Expr)
@ Chain ~/.julia/packages/Chain/h1xOi/src/Chain.jl:117
[4] var"@chain"(__source__::LineNumberNode, __module__::Module, initial_value::Any, block::Expr)
@ Chain ~/.julia/packages/Chain/h1xOi/src/Chain.jl:147
[5] eval
@ ./boot.jl:360 [inlined]
[6] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1116
[7] invokelatest(::Any, ::Any, ::Vararg{Any, N} where N; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base ./essentials.jl:708
[8] invokelatest(::Any, ::Any, ::Vararg{Any, N} where N)
@ Base ./essentials.jl:706
[9] inlineeval(m::Module, code::String, code_line::Int64, code_column::Int64, file::String; softscope::Bool)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.10/scripts/packages/VSCodeServer/src/eval.jl:211
[10] (::VSCodeServer.var"#58#62"{Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.10/scripts/packages/VSCodeServer/src/eval.jl:155
[11] withpath(f::VSCodeServer.var"#58#62"{Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.10/scripts/packages/VSCodeServer/src/repl.jl:185
[12] (::VSCodeServer.var"#57#61"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.10/scripts/packages/VSCodeServer/src/eval.jl:153
[13] hideprompt(f::VSCodeServer.var"#57#61"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.10/scripts/packages/VSCodeServer/src/repl.jl:36
[14] (::VSCodeServer.var"#56#60"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.10/scripts/packages/VSCodeServer/src/eval.jl:124
[15] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:491
[16] with_logger
@ ./logging.jl:603 [inlined]
[17] (::VSCodeServer.var"#55#59"{VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.5.10/scripts/packages/VSCodeServer/src/eval.jl:201
[18] #invokelatest#2
@ ./essentials.jl:708 [inlined]
[19] invokelatest(::Any)
@ Base ./essentials.jl:706
[20] macro expansion
@ ~/.vscode/extensions/julialang.language-julia-1.5.10/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined]
[21] (::VSCodeServer.var"#53#54")()
@ VSCodeServer ./task.jl:411