GithubHelp home page GithubHelp logo

Comments (5)

timholy avatar timholy commented on May 26, 2024

We'd need a reproducible test case to debug this. Does it work when you just load that specific file? If so, can you share it?

from fileio.jl.

junglegobs avatar junglegobs commented on May 26, 2024

Yes, I can: https://www87.zippyshare.com/v/NS6wRS5q/file.html

When I use JLD2.@load I get the following error:

@load "/home/u0128861/Desktop/storage-and-LOLE/results/monte_carlo/default_nP=1/mc_year_1016.jld2"
ERROR: LoadError: ArgumentError: "/home/u0128861/Desktop/storage-and-LOLE/results/monte_carlo/default_nP=1/mc_year_2000.jld2" is not a JLD2 file

If I do FileIO.load I get the previous error:

Error encountered while load FileIO.File{FileIO.DataFormat{:Gadget2}, String}("/home/u0128861/Desktop/storage-and-LOLE/results/monte_carlo/default_nP=1/mc_year_2000.jld2").

Fatal error:
ERROR: ArgumentError: Package AstroIO [c85a633c-0c3f-44a2-bffe-7f9d0681b3e7] is required but does not seem to be installed:
 - Run `Pkg.instantiate()` to install all recorded dependencies.

I presume my file is corrupted but the error from FileIO is miseleading.

from fileio.jl.

timholy avatar timholy commented on May 26, 2024

@islent, this appears to be an issue for you to tackle (see #264). The problem is that the Gadget2 detection is very "loose"; in

return temp1 == temp2
both temp1 and temp2 are zero, and this particular file starts with 196612 UInt8(0)s (wow!).

from fileio.jl.

timholy avatar timholy commented on May 26, 2024

It's definitely not a JLD file:

julia> f = File{format"JLD2"}("mc_year_1016.jld2")
File{DataFormat{:JLD2}, String}("mc_year_1016.jld2")

julia> load(f)
[ Info: Precompiling JLD2 [033835bb-8acc-5ee8-8aae-3f567f8a3819]
Error encountered while load File{DataFormat{:JLD2}, String}("mc_year_1016.jld2").

Fatal error:
ERROR: ArgumentError: "/tmp/fileio/mc_year_1016.jld2" is not a JLD2 file
Stacktrace:
  [1] verify_file_header(f::JLD2.JLDFile{JLD2.MmapIO})
    @ JLD2 ~/.julia/packages/JLD2/15Kr7/src/file_header.jl:26
  [2] jldopen(fname::String, wr::Bool, create::Bool, truncate::Bool, iotype::Type{JLD2.MmapIO}; fallback::Type{IOStream}, compress::Bool, mmaparrays::Bool)
    @ JLD2 ~/.julia/packages/JLD2/15Kr7/src/JLD2.jl:301
[...]

Clearly it's corrupted so there is no hope of reading it that way you intended. But it would be good if it simply said "file not recognized" rather than picking something essentially random.

from fileio.jl.

junglegobs avatar junglegobs commented on May 26, 2024

Thanks! I'm curious as to how it got so corrupted, also since I was getting the same error with all the files which were created on our cluster (which sounds very annoying to debug).

from fileio.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.