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

Can't load the package: LoadError: Cannot read stream serialized with a newer version of Julia #73

Closed
tlienart opened this issue Sep 11, 2020 · 6 comments

Comments

@tlienart
Copy link

tlienart commented Sep 11, 2020

Hello, I tried to just add and install JLSO and got the following stack trace:

(@v1.5) pkg> add JLSO Memento
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
  [9da8a3cd] + JLSO v2.3.3
  [f28f55f0] + Memento v1.1.1
No Changes to `~/.julia/environments/v1.5/Manifest.toml`

julia> using JLSO
[ Info: Precompiling JLSO [9da8a3cd-07a3-59c0-a743-3fdc52c30d11]
ERROR: LoadError: LoadError: LoadError: LoadError: Cannot read stream serialized with a newer version of Julia.
Got data version 11 > current version 10
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] readheader(::Serialization.Serializer{IOStream}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Serialization/src/Serialization.jl:715
 [3] handle_deserialize(::Serialization.Serializer{IOStream}, ::Int32) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Serialization/src/Serialization.jl:878
 [4] deserialize(::Serialization.Serializer{IOStream}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Serialization/src/Serialization.jl:773
 [5] deserialize at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Serialization/src/Serialization.jl:760 [inlined]
 [6] open(::typeof(Serialization.deserialize), ::String, ::Vararg{String,N} where N; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at ./io.jl:325
 [7] open at ./io.jl:323 [inlined]
 [8] (::TimeZones.var"#3#4"{String})() at /Users/tlienart/.julia/packages/TimeZones/v0mfN/src/types/timezone.jl:50
 [9] get!(::TimeZones.var"#3#4"{String}, ::Dict{String,Tuple{Dates.TimeZone,TimeZones.Class}}, ::String) at ./dict.jl:450
 [10] Dates.TimeZone(::String, ::TimeZones.Class) at /Users/tlienart/.julia/packages/TimeZones/v0mfN/src/types/timezone.jl:46 (repeats 2 times)
 [11] @tz_str(::LineNumberNode, ::Module, ::Any) at /Users/tlienart/.julia/packages/TimeZones/v0mfN/src/types/timezone.jl:86
 [12] #macroexpand#36 at ./expr.jl:108 [inlined]
 [13] macroexpand at ./expr.jl:107 [inlined]
 [14] docm(::LineNumberNode, ::Module, ::Any, ::Any, ::Bool) at ./docs/Docs.jl:521 (repeats 2 times)
 [15] @doc(::LineNumberNode, ::Module, ::String, ::Vararg{Any,N} where N) at ./boot.jl:464
 [16] include(::Function, ::Module, ::String) at ./Base.jl:380
 [17] include at ./Base.jl:368 [inlined]
 [18] include(::String) at /Users/tlienart/.julia/packages/Memento/9bH5Y/src/Memento.jl:1
 [19] top-level scope at /Users/tlienart/.julia/packages/Memento/9bH5Y/src/Memento.jl:43
 [20] include(::Function, ::Module, ::String) at ./Base.jl:380
 [21] include(::Module, ::String) at ./Base.jl:368
 [22] top-level scope at none:2
 [23] eval at ./boot.jl:331 [inlined]
 [24] eval(::Expr) at ./client.jl:467
 [25] top-level scope at ./none:3
in expression starting at /Users/tlienart/.julia/packages/Memento/9bH5Y/src/records.jl:157
in expression starting at /Users/tlienart/.julia/packages/Memento/9bH5Y/src/records.jl:142
in expression starting at /Users/tlienart/.julia/packages/Memento/9bH5Y/src/records.jl:142
in expression starting at /Users/tlienart/.julia/packages/Memento/9bH5Y/src/Memento.jl:43
ERROR: LoadError: Failed to precompile Memento [f28f55f0-a522-5efc-85c2-fe41dfb9b2d9] to /Users/tlienart/.julia/compiled/v1.5/Memento/fk6ge_SE3G1.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
 [6] include(::Function, ::Module, ::String) at ./Base.jl:380
 [7] include(::Module, ::String) at ./Base.jl:368
 [8] top-level scope at none:2
 [9] eval at ./boot.jl:331 [inlined]
 [10] eval(::Expr) at ./client.jl:467
 [11] top-level scope at ./none:3
in expression starting at /Users/tlienart/.julia/packages/JLSO/wSVbM/src/JLSO.jl:41
ERROR: Failed to precompile JLSO [9da8a3cd-07a3-59c0-a743-3fdc52c30d11] to /Users/tlienart/.julia/compiled/v1.5/JLSO/KVGL7_SE3G1.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
(@v1.5) pkg> status
Status `~/.julia/environments/v1.5/Project.toml`
  [c52e3926] Atom v0.12.21
  [6e4b80f9] BenchmarkTools v0.5.0
  [336ed68f] CSV v0.7.7
  [324d7699] CategoricalArrays v0.8.2
  [a93c6f00] DataFrames v0.21.7
  [864edb3b] DataStructures v0.18.4
  [7806a523] DecisionTree v0.10.9
  [713c75ef] Franklin v0.9.13 `~/.julia/dev/Franklin`
  [3a985190] FranklinTemplates v0.7.2
  [dcd8a645] FranklinUtils v0.2.1 `~/.julia/dev/FranklinUtils`
  [da1fdf0e] FreqTables v0.4.0
  [ecb7cac2] GithubMarkdown v0.1.2
  [cd3eb016] HTTP v0.8.17
  [7073ff75] IJulia v1.21.3
  [9da8a3cd] JLSO v2.3.3
  [97c1335a] JSExpr v0.5.2
  [0f8b85d8] JSON3 v1.1.2
  [e5e0dc1b] Juno v0.8.3
  [23fbe1c1] Latexify v0.14.0
  [fc18253b] LazyJSON v0.2.1
  [98b081ad] Literate v2.6.0
  [a7f614a8] MLJBase v0.15.2
  [6ee0df7b] MLJLinearModels v0.5.0
  [e80e1ace] MLJModelInterface v0.3.5
  [2e2323e0] MLJScientificTypes v0.3.0
  [1914dd2f] MacroTools v0.5.5
  [eff96d63] Measurements v2.3.0
  [f28f55f0] Memento v1.1.1
  [2bd173c7] NodeJS v1.1.1
  [bac558e1] OrderedCollections v1.3.0
  [e7214860] PkgPage v0.3.0 `~/.julia/dev/PkgPage`
  [c3e4b0f8] Pluto v0.11.13
  [08abe8d2] PrettyTables v0.9.1
  [92933f4c] ProgressMeter v1.3.2
  [438e738f] PyCall v1.91.4
  [d330b81b] PyPlot v2.9.0
  [295af30f] Revise v2.7.5
  [3646fa90] ScikitLearn v0.6.2
  [276daf66] SpecialFunctions v0.10.3
  [860ef19b] StableRNGs v0.1.1

on Julia 1.5.1 any clues as to what may be causing the problem? (cc @ablaom ) Thanks!

@oxinabox
Copy link
Member

Yep, Julia changed the serialisation format.
Not much we can do about it.
You'll need to load it in a version of Julia corresponding to that which it was saved it.

You can pull that out of the JLSO metadata.

@nickrobinson251
Copy link
Contributor

You'll need to load it in a version of Julia corresponding to that which it was saved it.
You can pull that out of the JLSO metadata.

Can/should we add this info to the error message somehow?

@oxinabox
Copy link
Member

Wait this is weirder.
This isn't trying to read a JLSO file with the wrong version.
This is an error occuring when loading Memento.jl

@oxinabox oxinabox changed the title LoadError: Cannot read stream serialized with a newer version of Julia. Got data version 11 > current version 10 Can LoadError: Cannot read stream serialized with a newer version of Julia Sep 11, 2020
@oxinabox oxinabox changed the title Can LoadError: Cannot read stream serialized with a newer version of Julia Can't load the package: LoadError: Cannot read stream serialized with a newer version of Julia Sep 11, 2020
@nickrobinson251
Copy link
Contributor

Memento depends on TimeZones ...could it be JuliaTime/TimeZones.jl#288?

@rofinn
Copy link
Member

rofinn commented Sep 11, 2020

Yeah, sorry, this is a re-occuring issue that I've seen people raise in slack and discourse with various packages (e.g., TimeZones.jl, Memento.jl, JLSO.jl, LibPQ.jl). I think Lyndon's suggestion would be pretty easy to add though.

@rofinn rofinn closed this as completed Sep 24, 2020
@rofinn
Copy link
Member

rofinn commented Sep 24, 2020

Closed since the solution is just to rebuild TimeZones.jl.

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

4 participants