Generating Weave documents using a Genie server

I’m trying to run this weave example on a Genie.jl server. However, it seems to block for some reason and not progress at all after a point.

To be precise, it blocks at this point.

└ Web Server starting at http://127.0.0.1:8000 - press Ctrl/Cmd+C to stop the server. 
┌ Info: Weaving chunk 1 from line 19
└   progress = 0.0
┌ Info: Weaving chunk 2 from line 42
└   progress = 0.16666666666666666
┌ Info: Weaving chunk 3 from line 71
└   progress = 0.3333333333333333
┌ Info: Weaving chunk 4 from line 83
└   progress = 0.5
┌ Info: Weaving chunk 5 from line 88
└   progress = 0.6666666666666666

I can’t even seem to Ctrl+C/Ctrl+D quit the process either.

htop tells me that the julia process is still using my system resources though.
I also seem to be able to run the weave example normally from a REPL. Could someone help me figure out what’s going on here and how I could fix this?

This is the file I include from REPL to get the server running.

using Weave
using Genie, Genie.Router, Genie.Renderer.Json, Genie.Requests
using HTTP

route("/weave") do
    weave("x.jmd"; out_path=:pwd)
    return
end

Genie.startup(async = false)

Note - here, x.jmd is the Weave.SAMPLE_JC_DOC file.

Update -
The workaround in the comment here - Weave hangs at the introduction example · Issue #310 · JunoLab/Weave.jl · GitHub - worked for me.

1 Like