-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typeassert error preventing load of saved jld file after 0.3.4 updates #198
Comments
Oh, drat. Not being able to read old .jld files is precisely what we don't want happening. Let's try to fix the error without forcing you to convert to a different format. Two questions:
|
HI Tim, The full message is: while loading In[2], in expression starting on line 56 in jlconvert at /Users/richard/.julia/v0.3/HDF5/src/jld_types.jl:397 the file size is unfortunately 8 gigabytes…the entire compustat north america financial accounting dataset for all public companies since 1950. these type problems happened before and always occur if i saved a dataframe with complex “any” type in one of the columns… so i have gotten into the routine of preserving the “original” csv file and all the scripts used to transform the dataset as a matter of redundancy protection. it just takes AGES to load the csv file. but it would be nice to know how to save data from jlds when they cannot be opened due to type errors. :) Richard
|
If you can come up with a small test case (e.g., |
I would guess the culprit is this commit in DataFrames, which changes the type of one of the fields in the DataFrame index from Maybe we should make that typeassert call |
@disleyland, does it fix it to change that line to out.$(T.names[i]) = convert(T.types[i], read_ref(file, ref)) |
changing the original line: out.$(T.names[i]) = read_ref(file, ref)::$(T.types[i]) for you new line: out.$(T.names[i]) = convert(T.types[i], read_ref(file, ref)) produces the error: "ERROR: T not defined”
|
Sorry, I wasn't being careful. I should have said
(I just tested this, and it passes tests on julia 0.3. Tests seem suddenly broken on julia 0.4, but I suspect that's a different issue.) |
hurray, that worked! thanks tim. did 0.3.4 break lots of things with data frames? all of the sudden several scripts i’ve used successfully for ages went caput today, unable to handle NAs and there up convert errors e.g., this used to work: by(df, [:YEAR], df -> if length(dropna(df[:ROIC])).>0 percentile(float(dropna(df[:ROIC])),50) else NA end) but stopped and forced me to change the NA to a NaN before i could get it working by(df, [:YEAR], df -> if length(dropna(df[:ROIC])).>0 percentile(float(dropna(df[:ROIC])),50) else NaN end) this works but then i had to adjust for the NaN :( richard
|
Great news! We'll implement this in HDF5. I don't really follow DataFrames, so I can't answer your other questions. @simonster knows a lot more. But I'd recommend posting your questions over at DataFrames. |
Hi, my first post.
I just upped to Julie 0.3.4 and updated packages. but when i tried to load my jld file, i got this error:
ERROR: type: jlconvert: in typeassert, expected Dict{Symbol,Int64}, got Dict{Symbol,Union(Real,AbstractArray{Real,1})}
Do i have to downgrade to retrieve data, save as csv, reload, resave, or is there an alternative way to recover data?
The text was updated successfully, but these errors were encountered: