World age error when constructing dataframe

bug

#1

I get world age error when I’m constructing some form of dataframe.
(I’m on Julia Version 0.6.0 Commit 903644385b* (2017-06-19 13:05 UTC) with Windows OS)

here is my example code to reproduce this error

using DataFrames

playerid = sample(collect(1:2154), 1000)
gachaid = sample(collect(1:39), 1000)
weights = rand(1000)

df = DataFrame(gachaid = gachaid, playerid = playerid, weights = weights)

which creates dataframe fine. but throws following error message

Error displaying DataFrames.DataFrame: MethodError: no method matching size(::DataArrays.DataArray{UInt16,1})
The applicable method may be too new: running in world age 21848, while current world is 22005.
Closest candidates are:
size(::DataArrays.DataArray) at C:\Users\kimyonghee.julia\v0.6\DataArrays\src\dataarray.jl:168 (method too new to be called from this world context.)
size(::AbstractArray{T,N}, !Matched::Any) where {T, N} at abstractarray.jl:29
size(::Any, !Matched::Integer, !Matched::Integer, !Matched::Integer…) where N at abstractarray.jl:30

thanks!


#2

Where does sample come from? I tried the code below, and it worked fine on Julia 0.6, OSX

using DataFrames, StatsBase

playerid = rand(collect(1:2154), 1000)
gachaid = rand(collect(1:39), 1000)
weights = rand(1000)

df = DataFrame(gachaid = gachaid, playerid = playerid, weights = weights)

#3

Are you on Juno? I had a similar issue and it’s only an error in displaying. If you run with Shift Enter the following code at the same time it gives error. If instead you evaluate using DataFrames and the rest separately it works fine.


#4

Yes, you are right. I’m on Juno and I was running whole code block with Shift Enter throws world age error.

Running it by line works fine. Thanks!


#5

This has been fixed with