cjdoris / Bokeh.jl

Interactive plotting made easy
https://cjdoris.github.io/Bokeh.jl
Other
77 stars 3 forks source link

Error in `using Bokeh BokeBlink;` on Windows with Julia 1.9.1 #26

Closed RoyiAvital closed 1 year ago

RoyiAvital commented 1 year ago

I have an error in the precompilation step of BokeBlink.jl:

julia> using Bokeh, BokehBlink;
[ Info: Precompiling BokehBlink [c7d4f63d-6dfa-4fdc-9408-5961e0889e3a]
ERROR: LoadError: InitError: AssertionError: isfile(f)
Stacktrace:
  [1] resource
    @ D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Blink\LhpHk\src\content\server.jl:5 [inlined]
  [2] resource(f::String)
    @ Blink D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Blink\LhpHk\src\content\server.jl:5
  [3] macro expansion
    @ D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Blink\LhpHk\src\AtomShell\webio.jl:34 [inlined]
  [4] (::Blink.AtomShell.var"#21#22")()
    @ Blink.AtomShell D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Lazy\9Xnd3\src\macros.jl:346
  [5] __init__()
    @ Blink.AtomShell D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Lazy\9Xnd3\src\macros.jl:341
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1115
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base .\loading.jl:1061
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base .\loading.jl:1506
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1783
 [10] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1660
 [11] macro expansion
    @ .\loading.jl:1648 [inlined]
 [12] macro expansion
    @ .\lock.jl:267 [inlined]
 [13] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1611
 [14] include
    @ .\Base.jl:457 [inlined]
 [15] 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::Nothing)
    @ Base .\loading.jl:2045
 [16] top-level scope
    @ stdin:3
during initialization of module AtomShell
in expression starting at D:\Applications\Programming\JuliaWin\userdata\.julia\packages\BokehBlink\LJnMy\src\BokehBlink.jl:1
in expression starting at stdin:3
ERROR: Failed to precompile BokehBlink [c7d4f63d-6dfa-4fdc-9408-5961e0889e3a] to "D:\\Applications\\Programming\\JuliaWin\\userdata\\.julia\\compiled\\v1.9\\BokehBlink\\jl_9123.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:2296
 [3] compilecache
   @ .\loading.jl:2163 [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

I am on Windows 10 with Julia 1.9.1.

cjdoris commented 1 year ago

From the stack trace, it looks like an error in Blink itself. Can you try using Blink?

RoyiAvital commented 1 year ago

It seems you were right:

julia> using Blink;
ERROR: InitError: AssertionError: isfile(f)
Stacktrace:
  [1] resource
    @ D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Blink\LhpHk\src\content\server.jl:5 [inlined]
  [2] resource(f::String)
    @ Blink D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Blink\LhpHk\src\content\server.jl:5
  [3] macro expansion
    @ D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Blink\LhpHk\src\AtomShell\webio.jl:34 [inlined]
  [4] (::Blink.AtomShell.var"#21#22")()
    @ Blink.AtomShell D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Lazy\9Xnd3\src\macros.jl:346
  [5] __init__()
    @ Blink.AtomShell D:\Applications\Programming\JuliaWin\userdata\.julia\packages\Lazy\9Xnd3\src\macros.jl:341
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1115
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base .\loading.jl:1061
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base .\loading.jl:1506
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1783
 [10] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1660
 [11] macro expansion
    @ .\loading.jl:1648 [inlined]
 [12] macro expansion
    @ .\lock.jl:267 [inlined]
 [13] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1611
during initialization of module AtomShell

julia>

Should I report?

RoyiAvital commented 1 year ago

OK, I had to clean: artifacts, compiled, packages and scratchspaces. Then installing and precompiling worked.

I guess some issue with the precompilation or something.