-
Notifications
You must be signed in to change notification settings - Fork 141
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
Can't dump closed file handle #366
Comments
This work for me. Try checking out master and try again. |
I still see the same behavior on Master. The following is after I ran _ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.5.0 (2016-09-19 18:14 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-apple-darwin13.4.0
julia> using HDF5
julia> f = h5open(tempname(),"w")
HDF5 data file: /var/folders/_0/25kp6h7x25v6vyjv2yjlcnkm000wrm/T/julia2zNuhi
julia> close(f)
julia> dump(f)
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 0:
#000: H5Gdeprec.c line 796 in H5Gget_num_objs(): not a location ID
major: Invalid arguments to routine
minor: Inappropriate type
#001: H5Gloc.c line 253 in H5G_loc(): invalid object ID
major: Invalid arguments to routine
minor: Bad value
HDF5.HDF5File len 0
ERROR: File or object has been closed
in checkvalid at /Users/user/.julia/v0.5/HDF5/src/HDF5.jl:677 [inlined]
in names(::HDF5.HDF5File) at /Users/user/.julia/v0.5/HDF5/src/HDF5.jl:997
in dump(::IOContext{Base.TTY}, ::HDF5.HDF5File, ::Int64, ::String) at /Users/user/.julia/v0.5/HDF5/src/HDF5.jl:1082
in #dump#323 at ./show.jl:1226 [inlined]
in (::Base.#kw##dump)(::Array{Any,1}, ::Base.#dump, ::IOContext{Base.TTY}, ::HDF5.HDF5File) at ./<missing>:0
in dump(::HDF5.HDF5File) at ./show.jl:1227
julia> Pkg.installed("HDF5")
v"0.7.3+" |
I now get the same error _ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.0-pre.alpha.140 (2017-03-14 00:06 UTC)
_/ |\__'_|_|_|\__'_| | Commit 58ed252* (1 day old master)
|__/ | x86_64-w64-mingw32
julia> using HDF5
julia> f = h5open(tempname(),"w")
HDF5 data file: C:\Users\Mus\AppData\Local\Temp\jl_DFB0.tmp
julia> close(f)
julia> dump(f)
HDF5-DIAG: Error detected in HDF5 (1.8.13) thread 0:
#000: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5Gdeprec.c line 844 in H5Gget_num_objs(): not a location ID
major: Invalid arguments to routine
minor: Inappropriate type
#001: /home/abuild/rpmbuild/BUILD/hdf5-1.8.13/src/H5Gloc.c line 253 in H5G_loc(): invalid object ID
major: Invalid arguments to routine
minor: Bad value
ERROR: Error getting group length
Stacktrace:
[1] h5g_get_num_objs at C:\Users\Mus\.julia\v0.6\HDF5\src\HDF5.jl:2135 [inlined]
[2] length(::HDF5.HDF5File) at C:\Users\Mus\.julia\v0.6\HDF5\src\HDF5.jl:957
[3] dump(::IOContext{Base.TTY}, ::HDF5.HDF5File, ::Int64, ::String) at C:\Users\Mus\.julia\v0.6\HDF5\src\HDF5.jl:1079
[4] #dump#247 at .\show.jl:1294 [inlined]
[5] (::Base.#kw##dump)(::Array{Any,1}, ::Base.#dump, ::IOContext{Base.TTY}, ::HDF5.HDF5File) at .\<missing>:0
[6] dump(::HDF5.HDF5File) at .\show.jl:1295
|
what is the desired output in this case? what can always add a |
Thats a good question. I was using dump hoping to see the fields and their values, but that apparently isn't what it does. I guess the desired output would be something as close as possible to the output for an open hdf5 file. The output for an open hdf5 file is
For comparison, the output of an open and close file (via
|
Ok that makes sense. I agree, it would be nice if it paralleled open. |
Note that |
thanks @yuyichao , ok so it seems we should remove dump in favor of printing the information instead in using |
That sounds reasonable for me. |
closed by #395 |
It seems like this should work
The text was updated successfully, but these errors were encountered: