# Error saving a .jld file

**URL:** <https://discourse.julialang.org/t/error-saving-a-jld-file/34246>\
**Category:** New to Julia\
**Created:** [February 6, 2020, 11:36am UTC](https://discourse.julialang.org/t/error-saving-a-jld-file/34246 "2020-02-06T11:36:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ennvvy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ennvvy/32/7816_2.png) [@ennvvy](https://discourse.julialang.org/u/ennvvy)\
**Post date:** [February 6, 2020, 11:36am UTC](https://discourse.julialang.org/t/error-saving-a-jld-file/34246/1 "2020-02-06T11:36:44Z")

</div>

I use julia v1.3.0 and have trouble saving a few variables in a .jld file. I get the following error

`HDF5-DIAG: Error detected in HDF5 (1.10.4) thread 0: #000: H5F.c line 444 in H5Fcreate(): unable to create file major: File accessibilty minor: Unable to open file #001: H5Fint.c line 1364 in H5F__create(): unable to open file major: File accessibilty minor: Unable to open file #002: H5Fint.c line 1557 in H5F_open(): unable to open file: time = Thu Feb 6 17:03:49 2020 , name = '/home/nv/Downloads/MC/1.jld', tent_flags = 13 major: File accessibilty minor: Unable to open file #003: H5FD.c line 734 in H5FD_open(): open failed major: Virtual File Layer minor: Unable to initialize object #004: H5FDsec2.c line 346 in H5FD_sec2_open(): unable to open file: name = '/home/nv/Downloads/MC/1.jld', errno = 2, error message = 'No such file or directory', flags = 13, o_flags = 602 major: File accessibilty minor: Unable to open file ERROR: Error creating file /home/nv/Downloads/MC/1.jld Stacktrace: [1] h5f_create at /Users/narayanivedam/.julia/packages/HDF5/Zh9on/src/HDF5.jl:2279 [inlined] [2] #jldopen#12(::Bool, ::Bool, ::Bool, ::typeof(jldopen), ::String, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at /Users/narayanivedam/.julia/packages/JLD/uVJmd/src/JLD.jl:170 [3] #jldopen at ./none:0 [inlined] [4] #jldopen#13(::Bool, ::Bool, ::Bool, ::typeof(jldopen), ::String, ::String) at /Users/narayanivedam/.julia/packages/JLD/uVJmd/src/JLD.jl:234 [5] (::JLD.var"#kw##jldopen")(::NamedTuple{(:compatible, :compress),Tuple{Bool,Bool}}, ::typeof(jldopen), ::String, ::String) at ./none:0 [6] #jldopen#14(::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol,Symbol},NamedTuple{(:compatible, :compress),Tuple{Bool,Bool}}}, ::typeof(jldopen), ::JLD.var"#39#40"{String,Array{Int64,1},Tuple{}}, ::String, ::Vararg{String,N} where N) at /Users/narayanivedam/.julia/packages/JLD/uVJmd/src/JLD.jl:244 [7] #jldopen at ./none:0 [inlined] [8] #save#38 at /Users/narayanivedam/.julia/packages/JLD/uVJmd/src/JLD.jl:1237 [inlined] [9] save(::FileIO.File{FileIO.DataFormat{:JLD}}, ::String, ::Array{Int64,1}) at /Users/narayanivedam/.julia/packages/JLD/uVJmd/src/JLD.jl:1234 [10] #save#15(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(save), ::String, ::String, ::Vararg{Any,N} where N) at /Users/narayanivedam/.julia/packages/FileIO/I1ONY/src/loadsave.jl:118 [11] save at /Users/narayanivedam/.julia/packages/FileIO/I1ONY/src/loadsave.jl:118 [inlined] [12] MonteCarlo(::Int64) at /Users/narayanivedam/Dropbox/Research/Simulations/Julia/2020_Final/MonteCarlo.jl:103 [13] top-level scope at none:0`

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 6, 2020, 11:37am UTC](https://discourse.julialang.org/t/error-saving-a-jld-file/34246/2 "2020-02-06T11:37:56Z")

</div>

First thing I would check is whether you have permissions to create/overwrite `/home/nv/Downloads/MC/1.jld`.

---

<div class="post-metadata">

**Author:** ![ennvvy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ennvvy/32/7816_2.png) [@ennvvy](https://discourse.julialang.org/u/ennvvy)\
**Post date:** [February 6, 2020, 11:40am UTC](https://discourse.julialang.org/t/error-saving-a-jld-file/34246/3 "2020-02-06T11:40:07Z")

</div>

I did, and I have access. I tried saving on a MacOS as well as Windows. I get the same error in both places. As suggested in an earlier post, I tried reinstalling HDF5 using home-brew and then did a `build HDF5` in Julia. But, nothing seems to be working.
