aluque / CloudScat.jl

Cloud scattering of lightning optical radiation
MIT License
5 stars 0 forks source link

HDF Output Broken in Fresh Julia 1.6.1 Install #2

Closed michaeljp24 closed 3 years ago

michaeljp24 commented 3 years ago

It seems that the HDF5 module has replaced g_create() with create_group() and attr() with attributes().

Modifying CloudScat.jl with these updated commands causes the save() function to progress to line 235, where it crashes with the following output:

ERROR: LoadError: MethodError: no method matching setindex!(::HDF5.Group, ::Vector{Float64}, ::String, ::String, ::Tuple{}, ::String, ::Int64) Closest candidates are: setindex!(::Union{HDF5.File, HDF5.Group}, ::Any, ::AbstractString; pv...) at /home/sciguymp/.julia/packages/HDF5/VJkAi/src/HDF5.jl:890 Stacktrace: [1] (::CloudScat.var"#28#30"{Vector{Observer}, Params})(file::HDF5.File) @ CloudScat ~/.julia/packages/CloudScat/1lojU/src/CloudScat.jl:235 [2] h5open(::CloudScat.var"#28#30"{Vector{Observer}, Params}, ::String, ::Vararg{String, N} where N; swmr::Bool, pv::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ HDF5 ~/.julia/packages/HDF5/VJkAi/src/HDF5.jl:458 [3] h5open @ ~/.julia/packages/HDF5/VJkAi/src/HDF5.jl:456 [inlined] [4] save(fname::String, observers::Vector{Observer}, params::Params) @ CloudScat ~/.julia/packages/CloudScat/1lojU/src/CloudScat.jl:217 [5] (::CloudScat.var"#21#25"{String, Bool, Params, World{Cylinder, Cylinder, Homogeneous, NoAbsorption, 3}, Vector{Observer}})() @ CloudScat ~/.julia/packages/CloudScat/1lojU/src/CloudScat.jl:203 [6] with_logstate(f::Function, logstate::Any) @ Base.CoreLogging ./logging.jl:491 [7] with_logger @ ./logging.jl:603 [inlined] [8] #main#20 @ ~/.julia/packages/CloudScat/1lojU/src/CloudScat.jl:179 [inlined] [9] run() @ Main /data/home/projects/CloudScat/experiments/sample.jl:91 [10] top-level scope @ /data/home/projects/CloudScat/experiments/sample.jl:97 in expression starting at /data/home/projects/CloudScat/experiments/sample.jl:97

aluque commented 3 years ago

Thanks, @michaeljp24. Indeed the API was changed in a recent version of HDF5.jl. I think it should be fixed by the latest commits to master.