Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to use Weave with a Genie server #414

Closed
thazhemadam opened this issue Sep 23, 2021 · 3 comments
Closed

[BUG] Unable to use Weave with a Genie server #414

thazhemadam opened this issue Sep 23, 2021 · 3 comments
Assignees

Comments

@thazhemadam
Copy link

thazhemadam commented Sep 23, 2021

Describe the bug
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. 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?

Error stacktrace
No error stacktrace since the REPL itself becomes unresponsive.

To reproduce

  1. Download the Weave example (name it, say, x.jmd)
  2. Create an environment with Genie, Weave and HTTP added as dependencies.
  3. Run -
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)
  1. Open up your browser and go to localhost:8080
  2. Keep an eye on the Genie server running, to see the block and non-responsiveness happen in real-time.

Expected behavior
The weave successfully completes operation without blocking and generates an HTML file.

Additional context
Please include the output of
julia> versioninfo()

Julia Version 1.7.0-beta4
Commit d0c90f37ba (2021-08-24 12:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

and
pkg> st

julia> using Pkg; Pkg.status()
  [717857b8] DSP v0.7.3
  [c43c736e] Genie v3.0.0
  [cd3eb016] HTTP v0.9.14
  [1dea7af3] OrdinaryDiffEq v5.55.1
  [91a5bcdd] Plots v1.22.1
  [44d3d7a6] Weave v0.10.10
  [9a3f8284] Random
  [8dfed614] Test
@essenciary
Copy link
Member

@thazhemadam Thanks - not familiar with Weave. Can you please share a minimum super basic example that I can work off?

@thazhemadam
Copy link
Author

This turned out to be an issue not with Genie, but with Weave itself (JunoLab/Weave.jl#441).
Thanks 😄

@AbhimanyuAryan
Copy link
Member

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

weave("x.jmd"; out_path=pwd()*"/public/")

route("/") do
   serve_static_file("x.html")
end

Genie.startup(async = false)

work fine @thazhemadam

Issue with Weave: JunoLab/Weave.jl#436

issue_genie_weave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants