Using Pumas issue

Hello,

Sporadically, I’ve been getting the following errors:

ERROR: ERROR: Invalid history file (/home/jrun/data/.juliapumas/logs/repl_history.jl) format:
If you have a history file left over from an older version of Julia,
try renaming or deleting it.
Invalid character: '\\0' at line 19041Invalid history file (/home/jrun/data/.juliapumas/logs/repl_history.jl) format:
If you have a history file left over from an older version of Julia,
try renaming or deleting it.
Invalid character: '\\0' at line 19041
Stacktrace:
\[1\]
Stacktrace:error(::String, ::String, ::String, ::Int64)

 @[1]  Baseerror(::String, ::String, ::String, ::Int64) 

./   @error.jl:44 Base
./ \[2\]error.jl:44 hist_from_file(hp::REPL.REPLHistoryProvider, path::String)

 @[2]  REPLhist_from_file(hp::REPL.REPLHistoryProvider, path::String) 

/opt/juliaup/depot/juliaup/julia-1.11.8+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/   @REPL.jl:727 REPL
/opt/juliaup/depot/juliaup/julia-1.11.8+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/ \[3\]REPL.jl:727 setup_interface(repl::REPL.LineEditREPL, hascolor::Bool, extra_repl_keymap::Any)

 @[3]  REPLsetup_interface(repl::REPL.LineEditREPL, hascolor::Bool, extra_repl_keymap::Any) 

/opt/juliaup/depot/juliaup/julia-1.11.8+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/   @REPL.jl:1221 REPL
/opt/juliaup/depot/juliaup/julia-1.11.8+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/ \[4\]REPL.jl:1221 setup_interface

 @[4]  /opt/juliaup/depot/juliaup/julia-1.11.8+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/setup_interfaceREPL.jl:1092

\[inlined\]   @
/opt/juliaup/depot/juliaup/julia-1.11.8+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/ \[5\]REPL.jl:1092  [inlined](::REPLExt.var%22#65#66%22)(repl::REPL.LineEditREPL)

 @[5]  REPLExthook_repl(repl::REPL.LineEditREPL) 

/opt/juliaup/depot/juliaup/julia-1.11.8+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/   @REPLExt.jl:317 VSCodeServer
\~/data/.code-server-extensions-pumas-4.104/julialang.language-julia-1.156.1/scripts/packages/VSCodeServer/src/ \[6\]repl.jl:139 \__atreplinit(repl::REPL.LineEditREPL)

 @[6]  Base(::VSCodeServer.var"#2#5"{REPL.LineEditREPL})() 

./   @client.jl:374 VSCodeServer
\~/data/.code-server-extensions-pumas-4.104/julialang.language-julia-1.156.1/scripts/packages/VSCodeServer/src/ \[7\]VSCodeServer.jl:62 #invokelatest#2

@[ Info: Disabling history file for this session

./essentials.jl:1055 \[inlined\]
\[8\] invokelatest
@ ./essentials.jl:1052 \[inlined\]
\[9\] \_atreplinit
@ ./client.jl:381 \[inlined\]
\[10\] (::Base.var"#1152#1154"{Bool, Symbol, Bool})(REPL::Module)
@ Base ./client.jl:438
\[11\] #invokelatest#2
@ ./essentials.jl:1055 \[inlined\]
\[12\] invokelatest
@ ./essentials.jl:1052 \[inlined\]
\[13\] run_main_repl(interactive::Bool, quiet::Bool, banner::Symbol, history_file::Bool, color_set::Bool)
@ Base ./client.jl:423
\[14\] repl_main
@ ./client.jl:560 \[inlined\]
\[15\] \_start()
@ Base ./client.jl:534

\[ Info: Disabling history file for this session
julia> using Pumas
ERROR: ArgumentError: Package Pumas \[4f2c3c20-a4ac-11e9-067b-e5872d3484cf\] is required but does not seem to be installed:

* Run `Pkg.instantiate()` to install all recorded dependencies.

Stacktrace:
\[1\] \_require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:2515
\[2\] \__require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:2388
\[3\] #invoke_in_world#3
@ ./essentials.jl:1089 \[inlined\]
\[4\] invoke_in_world
@ ./essentials.jl:1086 \[inlined\]
\[5\] \_require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:2375
\[6\] macro expansion
@ ./loading.jl:2314 \[inlined\]
\[7\] macro expansion
@ ./lock.jl:273 \[inlined\]
\[8\] \__require(into::Module, mod::Symbol)
@ Base ./loading.jl:2271
\[9\] #invoke_in_world#3
@ ./essentials.jl:1089 \[inlined\]
\[10\] invoke_in_world
@ ./essentials.jl:1086 \[inlined\]
\[11\] require(into::Module, mod::Symbol)
@ Base ./loading.jl:2260

It will happen over half the time, but if I reload the instance or launch a new instance, occasionally, the problem will go away. Is there a fix for this?

The immediate fix is to delete your history file. The issue is usually triggered by running multiple Julia sessions at the same time. Then they’ll try to write the the same history file with can corrupt the file.