Skip to content
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

filename.RData vs filename.Rdata #92

Closed
KronosTheLate opened this issue Feb 4, 2022 · 1 comment
Closed

filename.RData vs filename.Rdata #92

KronosTheLate opened this issue Feb 4, 2022 · 1 comment

Comments

@KronosTheLate
Copy link

So I have an Rdata file, as seen below:
image

The file extension is clearly Rdata. However, I get the following when reading it:

julia> using RData

julia> objs = load(joinpath(datadir, "data.Rdata"))
Error encountered while load FileIO.File{FileIO.DataFormat{:GZIP}, String}("C:\\Users\\username\\GeekyStuff\\Data\\data.Rdata").

Fatal error:
ERROR: Libz load error: neither load nor fileio_load is defined
  due to FileIO.SpecError(Libz, :load)
  Will try next loader.

Stacktrace:
 [1] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::FileIO.Formatted; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:209
 [2] action
   @ C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:197 [inlined]
 [3] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::Symbol, ::String; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:185
 [4] action
   @ C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:185 [inlined]
 [5] load(::String; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:113
 [6] load(::String)
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:110
 [7] top-level scope
   @ REPL[19]:1
Stacktrace:
 [1] handle_error(e::FileIO.LoaderError, q::Base.PkgId, bt::Vector{Union{Ptr{Nothing}, Base.InterpreterIP}})
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\error_handling.jl:61
 [2] handle_exceptions(exceptions::Vector{Tuple{Any, Union{Base.PkgId, Module}, Vector}}, action::String)
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\error_handling.jl:56
 [3] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::FileIO.Formatted; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:228
 [4] action
   @ C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:197 [inlined]
 [5] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::Symbol, ::String; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:185
 [6] action
   @ C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:185 [inlined]
 [7] load(::String; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:113
 [8] load(::String)
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:110
 [9] top-level scope
   @ REPL[19]:1

However, it works fine if I pretend the extension is RData:

julia> objs = load(joinpath(datadir, "data.RData"))
Dict{String, Any} with 1 entry:
  "ciphers" => [1.0 1.0  0.0 0.0; 1.0 1.0  0.0 0.0;  ; 1.0 8.0  0.0 0.0; 1.0 8.0  0.0 0.0]

The error gives no hint about this - I found it from the final comment in this discourse post.

What to do about it

Optimally, this package could figure this problem out on its own. Second best, the error message could suggest changing the file extension from Rdata to RData or rda.

@nalimilan
Copy link
Member

Duplicate of #91.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants