Bonito.jl icon indicating copy to clipboard operation
Bonito.jl copied to clipboard

Error with JSS.export_standalone()

Open AlexisRenchon opened this issue 3 years ago • 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

AlexisRenchon avatar Sep 24 '21 17:09 AlexisRenchon

The same problem occurred. Any progress?

HaoxuanGuo avatar Nov 28 '21 07:11 HaoxuanGuo

https://github.com/SimonDanisch/JSServe.jl/pull/113

SimonDanisch avatar Nov 28 '21 12:11 SimonDanisch

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

AlexisRenchon avatar Nov 28 '21 20:11 AlexisRenchon