Skip to content

MAT.jl v0.11.1 cannot read a file it wrote, containing empty dictionary #214

@jaakkor2

Description

@jaakkor2

Write the file with MAT.jl v0.11.1. Reading the file works in v0.10.7, but not in v0.11.1. This is a regression.

julia> matwrite("foo.mat", Dict("foo" => Dict{String, Any}()))

julia> matread("foo.mat")
ERROR: ArgumentError: collection must be non-empty
Stacktrace:
 [1] first
   @ .\abstractarray.jl:473 [inlined]
 [2] convert_struct_array(d::Dict{String, Any}, class::String)
   @ MAT.MAT_types C:\Users\jaakkor2\.julia\packages\MAT\Y70j6\src\MAT_types.jl:316
 [3] m_read(g::HDF5.Group, subsys::MAT.MAT_subsys.Subsystem)
   @ MAT.MAT_HDF5 C:\Users\jaakkor2\.julia\packages\MAT\Y70j6\src\MAT_HDF5.jl:330
 [4] read(f::MAT.MAT_HDF5.MatlabHDF5File, name::String)
   @ MAT.MAT_HDF5 C:\Users\jaakkor2\.julia\packages\MAT\Y70j6\src\MAT_HDF5.jl:345
 [5] read(f::MAT.MAT_HDF5.MatlabHDF5File)
   @ HDF5 C:\Users\jaakkor2\.julia\packages\HDF5\Z859u\src\types.jl:24
 [6] matread(filename::String; table::Type)
   @ MAT C:\Users\jaakkor2\.julia\packages\MAT\Y70j6\src\MAT.jl:192
 [7] matread(filename::String)
   @ MAT C:\Users\jaakkor2\.julia\packages\MAT\Y70j6\src\MAT.jl:188
 [8] top-level scope
   @ REPL[7]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions