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

Weave hangs at the introduction example #310

Open
newptcai opened this issue Apr 29, 2020 · 7 comments
Open

Weave hangs at the introduction example #310

newptcai opened this issue Apr 29, 2020 · 7 comments

Comments

@newptcai
Copy link
Contributor

I tried the following code from the document.

(weave) pkg> st
Status `~/Work/weave/Project.toml`
  [717857b8] DSP v0.6.6
  [91a5bcdd] Plots v1.2.0
  [44d3d7a6] Weave v0.9.4

julia> using Weave

julia> weave(joinpath(dirname(pathof(Weave)), "../examples", "FIR_design.jmd"),
         out_path=:pwd,
         doctype = "md2html")
[ Info: Weaving chunk 1 from line 42
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
WARNING: replacing module WeavePlots.
[ Info: Weaving chunk 2 from line 71
[ Info: Weaving chunk 3 from line 83
[ Info: Weaving chunk 4 from line 88

And it stops at line 88 for a few minutes until I ran out of patience.

@aviatesk
Copy link
Member

can you try on the latest Weave version ?:

@newptcai
Copy link
Contributor Author

Now it hangs at a different place

julia> weave(joinpath(dirname(pathof(Weave)), "../examples", "FIR_design.jmd"),
                out_path=:pwd,
                doctype = "md2html")
┌ Info: Weaving chunk 1 from line 26
└   progress = 0.0
┌ Info: Weaving chunk 2 from line 49
└   progress = 0.16666666666666666
[ Info: Precompiling DSP [717857b8-e6f2-59f4-9121-6e50c889abd2]
┌ Info: Weaving chunk 3 from line 78
└   progress = 0.3333333333333333
┌ Info: Weaving chunk 4 from line 90
└   progress = 0.5
┌ Info: Weaving chunk 5 from line 95
└   progress = 0.6666666666666666

However, this works if I change the example file and only weave the first 3 chuncks

julia> weave("./FIR_design.jmd",
                out_path=:pwd,
                doctype = "md2html")
┌ Info: Weaving chunk 1 from line 43
└   progress = 0.0
┌ Info: Weaving chunk 2 from line 72
└   progress = 0.3333333333333333
┌ Info: Weaving chunk 3 from line 84
└   progress = 0.6666666666666666
┌ Info: Weaved all chunks
└   progress = 1
[ Info: Report weaved to FIR_design.html
"~/Work/weave/FIR_design.html"

@pdubya
Copy link

pdubya commented Jul 28, 2021

I'm seeing the same issue. Seems to happen on plot blocks. I can make it progress by sending ^c when it gets stuck. @newptcai did you find a workaround for this?

(weave) pkg> st
      Status `~/Projects/weave/Project.toml`
  [717857b8] DSP v0.7.2
  [91a5bcdd] Plots v1.19.3
  [44d3d7a6] Weave v0.10.10

julia> using Weave

julia> weave(joinpath(dirname(pathof(Weave)), "../examples", "FIR_design.jmd"),
                out_path=:pwd,
                doctype = "md2html")
┌ Info: Weaving chunk 1 from line 26
└   progress = 0.0
┌ Info: Weaving chunk 2 from line 49
└   progress = 0.16666666666666666
┌ Info: Weaving chunk 3 from line 78
└   progress = 0.3333333333333333
┌ Info: Weaving chunk 4 from line 90
└   progress = 0.5
┌ Info: Weaving chunk 5 from line 95
└   progress = 0.6666666666666666
^C┌ Info: Weaving chunk 6 from line 102
└   progress = 0.8333333333333334
^C┌ Info: Weaved all chunks
└   progress = 1
[ Info: Weaved to /home/pjw/Projects/weave/FIR_design.html
"/home/pjw/Projects/weave/FIR_design.html"

@Ossifragus
Copy link

I had a similar problem #436 . You may try to see if the following workaround works for you.

ENV["GKSwstype"]="nul"
weave(joinpath(dirname(pathof(Weave)), "../examples", "FIR_design.jmd"),
                out_path=:pwd,
                doctype = "md2html")
ENV["GKSwstype"]="gksqt"

@AbhimanyuAryan
Copy link

@pdubya yes it opens an executable name GKSwstype (I guess maybe some library) which is causing this problem. Sending ctrl+c produces the output file. I confirm :)

@jjstickel
Copy link

jjstickel commented Dec 8, 2021

I am experiencing the same problem, running weave from the REPL in a graphical terminal on an Ubuntu system, where weave hangs at plot commands . As reported, ^C allows it to continue and produces a result. The workaround mentioned by @Ossifragus does work, but I also found that using the PyPlot backend also works. So that suggests the problem is related to the gr backend.

@gzagatti
Copy link

I had the same issue when running SciML/SciMLBenchmarks notebooks and @Ossifragus worked for me as well. This is such a non-obvious error. It would be good to somehow alert the user about it.

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

7 participants