SimonDanisch/Bonito.jl

Error with JSS.export_standalone()

AlexisRenchon opened this issue · 3 comments

e.g.,

using JSServe, WGLMakie

function handler(session, request)
    return scatter(1:4, color=1:4)
end

dir = joinpath(@__DIR__, "test")
mkdir(dir)
JSServe.export_standalone(handler, dir)

gives the error

ERROR: MethodError: no method matching JSServe.UrlSerializer(::Bool, ::String, ::Bool, ::String
)
Closest candidates are:
  JSServe.UrlSerializer(::Bool, ::Union{Nothing, String}, ::Bool, ::String, ::Bool) at /home/al
exis/.julia/packages/JSServe/E7QrV/src/types.jl:114
  JSServe.UrlSerializer(::Any, ::Any, ::Any, ::Any, ::Any) at /home/alexis/.julia/packages/JSSe
rve/E7QrV/src/types.jl:114
Stacktrace:
 [1] export_standalone(dom_handler::Function, folder::String; clear_folder::Bool, write_index_h
tml::Bool, absolute_urls::Bool, content_delivery_url::String)
   @ JSServe ~/.julia/packages/JSServe/E7QrV/src/offline.jl:128
 [2] export_standalone(dom_handler::Function, folder::String)
   @ JSServe ~/.julia/packages/JSServe/E7QrV/src/offline.jl:123
 [3] top-level scope
   @ REPL[35]:1

The same problem occurred. Any progress?

One thing that worked for me is create a figure locally, and then copy the html, instead of using export_standalone