Julia Agents.jl: fail to precomplieAgents

90 views Asked by At

Here is what it returned to me when I run

using Agents
[ Info: Precompiling Agents [46ada45e-f475-11e8-01d0-f70cc89e6671]
WARNING: method definition for #GridSpace#48 at C:\Users\PC\.julia\packages\Agents\h9Ls1\src\spaces\grid.jl:46 declares type variable W but does not use it.
ERROR: LoadError: type DataType has no field size
Stacktrace:
 [1] getproperty(x::Type, f::Symbol)
   @ Base .\Base.jl:32
 [2] top-level scope
   @ C:\Users\PC\.julia\packages\JLD2\qncOK\src\data\number_types.jl:14
 [3] include(mod::Module, _path::String)
   @ Base .\Base.jl:457
 [4] include(x::String)
   @ JLD2 C:\Users\PC\.julia\packages\JLD2\qncOK\src\JLD2.jl:1
 [5] top-level scope
   @ C:\Users\PC\.julia\packages\JLD2\qncOK\src\JLD2.jl:453
 [6] include
   @ .\Base.jl:457 [inlined]
 [7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
   @ Base .\loading.jl:2049
 [8] top-level scope
   @ stdin:3
in expression starting at C:\Users\PC\.julia\packages\JLD2\qncOK\src\data\number_types.jl:13
in expression starting at C:\Users\PC\.julia\packages\JLD2\qncOK\src\JLD2.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile JLD2 [033835bb-8acc-5ee8-8aae-3f567f8a3819] to "C:\\Users\\PC\\.julia\\compiled\\v1.9\\JLD2\\jl_B21B.tmp".
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base .\loading.jl:2300
  [3] compilecache
    @ .\loading.jl:2167 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1805
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1660
  [6] macro expansion
    @ .\loading.jl:1648 [inlined]
  [7] macro expansion
    @ .\lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1611
  [9] include(mod::Module, _path::String)
    @ Base .\Base.jl:457
 [10] include(x::String)
    @ Agents.AgentsIO C:\Users\PC\.julia\packages\Agents\h9Ls1\src\submodules\io\AgentsIO.jl:9
 [11] top-level scope
    @ C:\Users\PC\.julia\packages\Agents\h9Ls1\src\submodules\io\AgentsIO.jl:13
 [12] include(mod::Module, _path::String)
    @ Base .\Base.jl:457
 [13] include(x::String)
    @ Agents C:\Users\PC\.julia\packages\Agents\h9Ls1\src\Agents.jl:1
 [14] top-level scope
    @ C:\Users\PC\.julia\packages\Agents\h9Ls1\src\Agents.jl:38
 [15] include
    @ .\Base.jl:457 [inlined]
 [16] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
    @ Base .\loading.jl:2049
 [17] top-level scope
    @ stdin:3
in expression starting at C:\Users\PC\.julia\packages\Agents\h9Ls1\src\submodules\io\jld2_integration.jl:2
in expression starting at C:\Users\PC\.julia\packages\Agents\h9Ls1\src\submodules\io\AgentsIO.jl:3
in expression starting at C:\Users\PC\.julia\packages\Agents\h9Ls1\src\Agents.jl:1
in expression starting at stdin:3
ERROR: Failed to precompile Agents [46ada45e-f475-11e8-01d0-f70cc89e6671] to "C:\\Users\\PC\\.julia\\compiled\\v1.9\\Agents\\jl_A1CF.tmp".
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base .\loading.jl:2300
  [3] compilecache
    @ .\loading.jl:2167 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1805
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1660
  [6] macro expansion
    @ .\loading.jl:1648 [inlined]
  [7] macro expansion
    @ .\lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1611
  [9] eval
    @ .\boot.jl:370 [inlined]
 [10] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
    @ Base .\loading.jl:1903
 [11] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base .\essentials.jl:819
 [12] invokelatest(::Any, ::Any, ::Vararg{Any})
    @ Base .\essentials.jl:816
 [13] inlineeval(m::Module, code::String, code_line::Int64, code_column::Int64, file::String; softscope::Bool)
    @ VSCodeServer c:\Users\PC\.vscode\extensions\julialang.language-julia-1.51.2\scripts\packages\VSCodeServer\src\eval.jl:261
 [14] (::VSCodeServer.var"#67#72"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer c:\Users\PC\.vscode\extensions\julialang.language-julia-1.51.2\scripts\packages\VSCodeServer\src\eval.jl:181
 [15] withpath(f::VSCodeServer.var"#67#72"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)
    @ VSCodeServer c:\Users\PC\.vscode\extensions\julialang.language-julia-1.51.2\scripts\packages\VSCodeServer\src\repl.jl:274
 [16] (::VSCodeServer.var"#66#71"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer c:\Users\PC\.vscode\extensions\julialang.language-julia-1.51.2\scripts\packages\VSCodeServer\src\eval.jl:179
 [17] hideprompt(f::VSCodeServer.var"#66#71"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})
    @ VSCodeServer c:\Users\PC\.vscode\extensions\julialang.language-julia-1.51.2\scripts\packages\VSCodeServer\src\repl.jl:38
 [18] (::VSCodeServer.var"#65#70"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer c:\Users\PC\.vscode\extensions\julialang.language-julia-1.51.2\scripts\packages\VSCodeServer\src\eval.jl:150
 [19] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging .\logging.jl:514
 [20] with_logger
    @ .\logging.jl:626 [inlined]
 [21] (::VSCodeServer.var"#64#69"{VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer c:\Users\PC\.vscode\extensions\julialang.language-julia-1.51.2\scripts\packages\VSCodeServer\src\eval.jl:253
 [22] #invokelatest#2
    @ .\essentials.jl:819 [inlined]
 [23] invokelatest(::Any)
    @ Base .\essentials.jl:816
 [24] macro expansion
    @ c:\Users\PC\.vscode\extensions\julialang.language-julia-1.51.2\scripts\packages\VSCodeServer\src\eval.jl:34 [inlined]
 [25] (::VSCodeServer.var"#62#63")()
    @ VSCodeServer .\task.jl:514

I tried to update the packages but still not working. I've also tried to reinstall Julia, and this package will wrok for only one time after the reinstallation. Then the second time I run

using Agents

It will fail again. I've been trying to fix it for so long time.

Could anyone help me with it? Thank you very much!

0

There are 0 answers