Weird problem: Symbolics crashes on first import then works on second

I just start playing around with Symbolics. Great package! So I added it using pkg and now every time I enter the REPL and issue the command using Symbolics the first time round I get the stack trace below. And even though it tells me to instantiate the project I don’t really have to. I just need to run using Symbolics one more time and it works great. What am I missing here?

PS as you can see in the stack trace I am using Julia 1.10.4+0.aarch64.apple.darwin14

julia> using Symbolics
β”Œ Error: Error during loading of extension TestExt of TranscodingStreams, use Base.retry_load_extensions() to retry.
β”‚ exception =
β”‚ 1-element ExceptionStack:
β”‚ ArgumentError: Package TestExt [29286dec-c893-52d1-88fe-e07e79eb4405] is required but does not seem to be installed:
β”‚ - Run Pkg.instantiate() to install all recorded dependencies.
β”‚
β”‚ Stacktrace:
β”‚ [1] _require(pkg::Base.PkgId, env::Nothing)
β”‚ @ Base ./loading.jl:1926
β”‚ [2] __require_prelocked(uuidkey::Base.PkgId, env::Nothing)
β”‚ @ Base ./loading.jl:1812
β”‚ [3] #invoke_in_world#3
β”‚ @ ./essentials.jl:926 [inlined]
β”‚ [4] invoke_in_world
β”‚ @ ./essentials.jl:923 [inlined]
β”‚ [5] _require_prelocked
β”‚ @ ./loading.jl:1803 [inlined]
β”‚ [6] _require_prelocked
β”‚ @ ./loading.jl:1802 [inlined]
β”‚ [7] run_extension_callbacks(extid::Base.ExtensionId)
β”‚ @ Base ./loading.jl:1295
β”‚ [8] run_extension_callbacks(pkgid::Base.PkgId)
β”‚ @ Base ./loading.jl:1330
β”‚ [9] run_package_callbacks(modkey::Base.PkgId)
β”‚ @ Base ./loading.jl:1164
β”‚ [10] _tryrequire_from_serialized(modkey::Base.PkgId, path::String, ocachepath::String, sourcepath::String, depmods::Vector{Any})
β”‚ @ Base ./loading.jl:1487
β”‚ [11] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
β”‚ @ Base ./loading.jl:1574
β”‚ [12] _require(pkg::Base.PkgId, env::String)
β”‚ @ Base ./loading.jl:1938
β”‚ [13] __require_prelocked(uuidkey::Base.PkgId, env::String)
β”‚ @ Base ./loading.jl:1812
β”‚ [14] #invoke_in_world#3
β”‚ @ ./essentials.jl:926 [inlined]
β”‚ [15] invoke_in_world
β”‚ @ ./essentials.jl:923 [inlined]
β”‚ [16] _require_prelocked(uuidkey::Base.PkgId, env::String)
β”‚ @ Base ./loading.jl:1803
β”‚ [17] macro expansion
β”‚ @ ./loading.jl:1790 [inlined]
β”‚ [18] macro expansion
β”‚ @ ./lock.jl:267 [inlined]
β”‚ [19] __require(into::Module, mod::Symbol)
β”‚ @ Base ./loading.jl:1753
β”‚ [20] #invoke_in_world#3
β”‚ @ ./essentials.jl:926 [inlined]
β”‚ [21] invoke_in_world
β”‚ @ ./essentials.jl:923 [inlined]
β”‚ [22] require(into::Module, mod::Symbol)
β”‚ @ Base ./loading.jl:1746
β”‚ [23] eval
β”‚ @ ./boot.jl:385 [inlined]
β”‚ [24] eval_user_input(ast::Any, backend::REPL.REPLBackend, mod::Module)
β”‚ @ REPL ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPL.jl:150
β”‚ [25] repl_backend_loop(backend::REPL.REPLBackend, get_module::Function)
β”‚ @ REPL ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPL.jl:246
β”‚ [26] start_repl_backend(backend::REPL.REPLBackend, consumer::Any; get_module::Function)
β”‚ @ REPL ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPL.jl:231
β”‚ [27] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool, backend::Any)
β”‚ @ REPL ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPL.jl:389
β”‚ [28] run_repl(repl::REPL.AbstractREPL, consumer::Any)
β”‚ @ REPL ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPL.jl:375
β”‚ [29] (::Base.var"#1013#1015"{Bool, Bool, Bool})(REPL::Module)
β”‚ @ Base ./client.jl:432
β”‚ [30] #invokelatest#2
β”‚ @ ./essentials.jl:892 [inlined]
β”‚ [31] invokelatest
β”‚ @ ./essentials.jl:889 [inlined]
β”‚ [32] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
β”‚ @ Base ./client.jl:416
β”‚ [33] exec_options(opts::Base.JLOptions)
β”‚ @ Base ./client.jl:333
β”‚ [34] _start()
β”‚ @ Base ./client.jl:552
β”” @ Base loading.jl:1301

1 Like

Symbolics isn’t crashing per se, but some other package loaded during loading of Symbolics is causing an error. You often won’t get loading errors a second time in the same session. So something is broken, but maybe something ancillary.

Looks like something in the dependency chain for Symbolics depends on Test, for some reason, and TranscodingStreams has a package extension for Test, for some reason. So loading Test as part of Symbolics tries to load the TranscodingStreams extension for Test, but that fails.

(@v1.10) pkg> why Test
  Symbolics β†’ DynamicPolynomials β†’ MultivariatePolynomials β†’ MutableArithmetics β†’ Test
  Symbolics β†’ DynamicPolynomials β†’ MutableArithmetics β†’ Test
  Symbolics β†’ DynamicPolynomials β†’ Test
  Symbolics β†’ SciMLBase β†’ Accessors β†’ Test
  Symbolics β†’ SciMLBase β†’ RecursiveArrayTools β†’ SymbolicIndexingInterface β†’ Accessors β†’ Test
  Symbolics β†’ SciMLBase β†’ SymbolicIndexingInterface β†’ Accessors β†’ Test
  Symbolics β†’ SymbolicIndexingInterface β†’ Accessors β†’ Test
  Symbolics β†’ SymbolicLimits β†’ SymbolicUtils β†’ DynamicPolynomials β†’ MultivariatePolynomials β†’ MutableArithmetics β†’ Test
  Symbolics β†’ SymbolicLimits β†’ SymbolicUtils β†’ DynamicPolynomials β†’ MutableArithmetics β†’ Test
  Symbolics β†’ SymbolicLimits β†’ SymbolicUtils β†’ DynamicPolynomials β†’ Test
  Symbolics β†’ SymbolicLimits β†’ SymbolicUtils β†’ MultivariatePolynomials β†’ MutableArithmetics β†’ Test
  Symbolics β†’ SymbolicLimits β†’ SymbolicUtils β†’ SymbolicIndexingInterface β†’ Accessors β†’ Test
  Symbolics β†’ SymbolicUtils β†’ DynamicPolynomials β†’ MultivariatePolynomials β†’ MutableArithmetics β†’ Test
  Symbolics β†’ SymbolicUtils β†’ DynamicPolynomials β†’ MutableArithmetics β†’ Test
  Symbolics β†’ SymbolicUtils β†’ DynamicPolynomials β†’ Test
  Symbolics β†’ SymbolicUtils β†’ MultivariatePolynomials β†’ MutableArithmetics β†’ Test
  Symbolics β†’ SymbolicUtils β†’ SymbolicIndexingInterface β†’ Accessors β†’ Test

I think there was just a gripe somewhere about removing dependencies on Test from the General registry…

But if you remove TranscodingStreams, I think your error will go away. Or maybe that’s where a bug report should go?

1 Like

I removed the TestExt of TranscodingStreams in remove TestExt.jl by nhz2 Β· Pull Request #238 Β· JuliaIO/TranscodingStreams.jl Β· GitHub

I think the issue is you are using an old version of TranscodingStreams for some reason.

What does:

using Pkg
pkg"status --outdated -m"

show?

1 Like

I deleted my Manifest.toml and compiled cache. I then reinstantiated and recompiled everything and now it works fine! Thanks for the help. BTW the trick I learned from
this & another issue I had is you need to delete your Manifest file and reinstantiate. Cleaning the cache is not sufficient to solve problems like these! In the future I will do that before posting here. Hopefully others can learn from this so I wouldn’t have wasted others valuable time!

Yeah part of this is that we just need v1.11 to come out for v1.10 to be the new LTS, and then everyone needs to make Test an extension library. We need to clean up the whole ecosystem, and if anyone wants to help please help clean those.

Such junk, all of those libraries need a PR.

1 Like