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

Serialization doesn't work with IOStream #19

Closed
omus opened this issue Sep 24, 2020 · 0 comments · Fixed by #20
Closed

Serialization doesn't work with IOStream #19

omus opened this issue Sep 24, 2020 · 0 comments · Fixed by #20

Comments

@omus
Copy link
Contributor

omus commented Sep 24, 2020

julia> using BitIntegers, Serialization

julia> file = tempname()
"/var/folders/m2/jn0j4mc13p56hxw8c9tjtqsc0000gn/T/jl_8QgWFG"

julia> open(file, "w") do io
           serialize(Serializer(io), UInt512(1))
       end

julia> open(file, "r") do io
           deserialize(Serializer(io))
       end
ERROR: The IO stream does not support reading objects of type UInt512.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] read(::IOStream, ::Type{T} where T) at ./io.jl:946
 [3] deserialize(::Serializer{IOStream}, ::DataType) at /Users/omus/Development/Julia/1.5/usr/share/julia/stdlib/v1.5/Serialization/src/Serialization.jl:1331
 [4] handle_deserialize(::Serializer{IOStream}, ::Int32) at /Users/omus/Development/Julia/1.5/usr/share/julia/stdlib/v1.5/Serialization/src/Serialization.jl:837
 [5] deserialize(::Serializer{IOStream}) at /Users/omus/Development/Julia/1.5/usr/share/julia/stdlib/v1.5/Serialization/src/Serialization.jl:773
 [6] #3 at ./REPL[4]:2 [inlined]
 [7] open(::var"#3#4", ::String, ::Vararg{String,N} where N; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at ./io.jl:325
 [8] open(::Function, ::String, ::String) at ./io.jl:323
 [9] top-level scope at REPL[4]: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

Successfully merging a pull request may close this issue.

1 participant