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

Julia DateTime cannot be written in mat file #158

Open
pablosaa opened this issue Mar 3, 2021 · 0 comments
Open

Julia DateTime cannot be written in mat file #158

pablosaa opened this issue Mar 3, 2021 · 0 comments

Comments

@pablosaa
Copy link

pablosaa commented Mar 3, 2021

I got the following error by trying to store Julia's DateTime variables into a MAT file, is there any work around for the error described below?

julia> using MAT
julia> using Dates

julia> t = now()
julia> fmat = matopen("test.mat", "w")
MAT.MAT_HDF5.MatlabHDF5File(HDF5 data file: test.mat, true, true, 0, false)

julia> write(fmat, "T", t)
ERROR: This is the write function for CompositeKind, but the input doesn't fit
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] m_write(::MAT.MAT_HDF5.MatlabHDF5File, ::HDF5.HDF5File, ::String, ::DateTime) at /home/user/.julia/packages/MAT/2LFMT/src/MAT_HDF5.jl:529
 [3] write(::MAT.MAT_HDF5.MatlabHDF5File, ::String, ::DateTime) at /home/user/.julia/packages/MAT/2LFMT/src/MAT_HDF5.jl:545
 [4] top-level scope at REPL[291]:1
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

1 participant