You probably already know about this, but I thought I would post it just in case:
ERROR: LoadError: LoadError: UndefVarError: sub not defined
Stacktrace:
[1] include_from_node1(::String) at ./loading.jl:539
[2] include(::String) at ./sysimg.jl:14
[3] macro expansion at /home/icarus/.julia/v0.6/DataFrames/src/DataFrames.jl:132 [inlined]
[4] anonymous at ./<missing>:?
[5] include_from_node1(::String) at ./loading.jl:539
[6] include(::String) at ./sysimg.jl:14
[7] anonymous at ./<missing>:2
while loading /home/icarus/.julia/v0.6/DataFrames/src/subdataframe/subdataframe.jl, in expression starting on line 78
while loading /home/icarus/.julia/v0.6/DataFrames/src/DataFrames.jl, in expression starting on line 101
I was just trying to use DataFrames in my package. I am guessing this is a julia v0.6 issue because this was working just a little while ago.
Yes. This is because sub was deprecated in 0.5 and the deprecation warning was recently removed on 0.6. The uses of sub should be changed to view.
INFO: Precompiling module DataFrames.
WARNING: Array{T}(::Type{T}, m::Int) is deprecated, use Array{T}(m) instead.
Stacktrace:
[1] depwarn(::String, ::Symbol) at .\deprecated.jl:62
[2] Array(::Type{Void}, ::Int64) at .\deprecated.jl:50
[3] DataArrays.DataArray(::Type{T} where T, ::Int64) at C:Users\hong.julia\v0.6\DataArrays\src\dataarray.jl:111
[4] include_from_node1(::String) at .\loading.jl:539
[5] include(::String) at .\sysimg.jl:14
[6] macro expansion at C:Users\hong.julia\v0.6\DataFrames\src\DataFrames.jl:132 [inlined]
[7] anonymous at .\
[8] include_from_node1(::String) at .\loading.jl:539
[9] include(::String) at .\sysimg.jl:14
[10] anonymous at .\
[11] eval(::Module, ::Any) at .\boot.jl:236
[12] process_options(::Base.JLOptions) at .\client.jl:281
[13] _start() at .\client.jl:366
while loading C:Users\hong.julia\v0.6\DataFrames\src\abstractdataframe\abstractdataframe.jl, in expression starting on line 719
ERROR: LoadError: LoadError:
UndefVarError: sub not defined
Stacktrace:
[1] include_from_node1(::String) at .\loading.jl:539
[2] include(::String) at .\sysimg.jl:14
[3] macro expansion at C:Users\hong.julia\v0.6\DataFrames\src\DataFrames.jl:132 [inlined]
[4] anonymous at .\
[5] include_from_node1(::String) at .\loading.jl:539
[6] include(::String) at .\sysimg.jl:14
[7] anonymous at .\
while loading C:Users\hong.julia\v0.6\DataFrames\srcsubdataframesubdataframe.jl, in expression starting on line 78
while loading C:Users\hong.julia\v0.6\DataFrames\src\DataFrames.jl, in expression starting on line 101
FWIW I have been following this issue since I see it on openSUSE as well. Definitely for me a 0.6 issue, Julia 0.5 works fine. Today, after updating Julia, the error with symbol "sub" has changed to error with symbol "head". Using checked-out version of both DataArrays and DataFrames:
julia> Pkg.status("DataFrames")
- DataFrames 0.8.5+ master
julia> Pkg.status("DataArrays")
- DataArrays 0.3.12+ master
the error is:
ERROR: LoadError: LoadError: UndefVarError: head not defined
Stacktrace:
[1] include_from_node1(::String) at ./loading.jl:539
[2] include(::String) at ./sysimg.jl:14
[3] macro expansion at /home/colin/.julia/v0.6/DataFrames/src/DataFrames.jl:132 [inlined]
[4] anonymous at ./<missing>:?
[5] include_from_node1(::String) at ./loading.jl:539
[6] include(::String) at ./sysimg.jl:14
[7] anonymous at ./<missing>:2
while loading /home/colin/.julia/v0.6/DataFrames/src/abstractdataframe/abstractdataframe.jl, in expression starting on line 288
while loading /home/colin/.julia/v0.6/DataFrames/src/DataFrames.jl, in expression starting on line 101
ERROR: Failed to precompile DataFrames to /home/colin/.julia/lib/v0.6/DataFrames.ji.
I would have kept quiet but with the impending release of 0.6 it seemed relevant.
I am having similar problems with Julia 0.6
julia> using DataFrames
INFO: Precompiling module DataFrames.
WARNING: deprecated syntax "abstract AbstractIndex" at /Users/xxx/.julia/v0.6/DataFrames/src/other/index.jl:7.
Use "abstract type AbstractIndex end" instead.
WARNING: deprecated syntax "abstract AbstractDataFrame" at /Users/xxx/.julia/v0.6/DataFrames/src/abstractdataframe/abstractdataframe.jl:63.
Use "abstract type AbstractDataFrame end" instead.
ERROR: LoadError: LoadError: UndefVarError: head not defined
Stacktrace:
[1] include_from_node1(::String) at ./loading.jl:539
[2] include(::String) at ./sysimg.jl:14
[3] macro expansion at /Users/xxx/.julia/v0.6/DataFrames/src/DataFrames.jl:132 [inlined]
[4] anonymous at ./<missing>:?
[5] include_from_node1(::String) at ./loading.jl:539
[6] include(::String) at ./sysimg.jl:14
[7] anonymous at ./<missing>:2
while loading /Users/xxx/.julia/v0.6/DataFrames/src/abstractdataframe/abstractdataframe.jl, in expression starting on line 288
while loading /Users/xxx/.julia/v0.6/DataFrames/src/DataFrames.jl, in expression starting on line 101
ERROR: Failed to precompile DataFrames to /Users/xxx/.julia/lib/v0.6/DataFrames.ji.
Stacktrace:
[1] compilecache(::String) at ./loading.jl:673
[2] require(::Symbol) at ./loading.jl:460
julia> readtable
ERROR: UndefVarError: readtable not defined
@yangcht #1164 hasn't been merged, so that's expected.
Seems to be fixed now.
I just installed a new version of the stable julia 0.6
julia> versioninfo()
Julia Version 0.6.0
Commit 9036443 (2017-06-19 13:05 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, skylake)
This is a new problem to me. It seems to be related with the 0.6 version.
julia> using DataFrames
INFO: Precompiling module DataFrames.
WARNING: Method definition ==(Base.Nullable{S}, Base.Nullable{T}) in module Base at nullable.jl:238 overwritten in module NullableArrays at /home/icarus/.julia/v0.6/NullableArrays/src/operators.jl:128.
WARNING: deprecated syntax "abstract AbstractIndex" at /home/icarus/.julia/v0.6/DataFrames/src/other/index.jl:7.
Use "abstract type AbstractIndex end" instead.
WARNING: deprecated syntax "abstract AbstractDataFrame" at /home/icarus/.julia/v0.6/DataFrames/src/abstractdataframe/abstractdataframe.jl:63.
Use "abstract type AbstractDataFrame end" instead.
WARNING: Base.linearindexing is deprecated, use Base.IndexStyle instead.
likely near /home/icarus/.julia/v0.6/DataFrames/src/abstractdataframe/abstractdataframe.jl:91
WARNING: Method definition describe(AbstractArray{T, N} where N where T) in module StatsBase at /home/icarus/.julia/v0.6/StatsBase/src/scalarstats.jl:560 overwritten in module DataFrames at /home/icarus/.julia/v0.6/DataFrames/src/abstractdataframe/abstractdataframe.jl:380.
WARNING: deprecated syntax "typealias ColumnIndex @compat Union{Real,Symbol}" at /home/icarus/.julia/v0.6/DataFrames/src/dataframe/dataframe.jl:226.
Use "const ColumnIndex = @compat Union{Real,Symbol}" instead.
WARNING: deprecated syntax "inner constructor SubDataFrame(...) around /home/icarus/.julia/v0.6/DataFrames/src/subdataframe/subdataframe.jl:55".
Use "SubDataFrame{T}(...) where T" instead.
ERROR: LoadError: LoadError: UndefVarError: sub not defined
Stacktrace:
[1] include_from_node1(::String) at ./loading.jl:569
[2] include(::String) at ./sysimg.jl:14
[3] macro expansion at /home/icarus/.julia/v0.6/DataFrames/src/DataFrames.jl:137 [inlined]
[4] anonymous at ./<missing>:?
[5] include_from_node1(::String) at ./loading.jl:569
[6] include(::String) at ./sysimg.jl:14
[7] anonymous at ./<missing>:2
while loading /home/icarus/.julia/v0.6/DataFrames/src/subdataframe/subdataframe.jl, in expression starting on line 78
while loading /home/icarus/.julia/v0.6/DataFrames/src/DataFrames.jl, in expression starting on line 106
ERROR: Failed to precompile DataFrames to /home/icarus/.julia/lib/v0.6/DataFrames.ji.
Stacktrace:
[1] compilecache(::String) at ./loading.jl:703
[2] _require(::Symbol) at ./loading.jl:490
[3] require(::Symbol) at ./loading.jl:398
@alexhallam What version of DataFrames are you using? (Pkg.status("DataFrames"))
julia> Pkg.status("DataFrames")
- DataFrames 0.8.3+ master
julia> Pkg.update("DataFrames")
INFO: Updating METADATA...
WARNING: Cannot perform fast-forward merge.
INFO: Updating DataFrames master...
INFO: Computing changes...
INFO: Package DataFrames was set to version 0.8.3+, but a higher version 0.10.0 exists.
The package is fixed. You can try using `Pkg.free("DataFrames")` to update it.
INFO: No packages to install, update or remove
Please do Pkg.free("DataFrames") as the message suggests; your version is quite outdated.
That was perfect. What is the difference between Pkg.free and Pkg.update
julia> Pkg.free("DataFrames")
INFO: Freeing DataFrames
INFO: Cloning cache of AxisArrays from https://github.com/JuliaArrays/AxisArrays.jl.git
INFO: Cloning cache of IntervalSets from https://github.com/JuliaMath/IntervalSets.jl.git
INFO: Cloning cache of NamedArrays from https://github.com/davidavdav/NamedArrays.jl.git
INFO: Cloning cache of RangeArrays from https://github.com/JuliaArrays/RangeArrays.jl.git
INFO: Installing AxisArrays v0.1.4
INFO: Installing IntervalSets v0.1.1
INFO: Installing NamedArrays v0.6.1
INFO: Upgrading RCall: v0.5.2 => v0.7.3
INFO: Installing RangeArrays v0.2.0
julia> Pkg.status("DataFrames")
- DataFrames 0.10.0
When you have a package checked out to a particular Git branch or if you have it pinned to a particular version, Pkg.free puts the package back at the most recent version. It has no effect if you're already using the most recent version. Pkg.update updates all installed packages.
In this case, it looks like you're getting all of those updates when freeing DataFrames because your version of DataFrames was so old that it had been keeping RCall from updating, but now that DataFrames can go to its most recent version, RCall can too.