-
Notifications
You must be signed in to change notification settings - Fork 10
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
use render-current-state via code creates html with failiing images #40
Comments
Thre is somethinh weired going on. lein exec -ep "(use 'notespace.cli)(eval-and-realize-a-notespace "notespace.v3-experiment1-test")" Running the same in repl works:
|
I diffed the produced html, and it differs in size. |
Interesting. It looks like the problem with the first time is that it renders the code when it is not supposed to render. |
I tried to a lot of variations of the code, with "sleeps and prints" eveywhere, and the only working workaround is to run evaluation twice: (require '[notespace.v3-experiment1-test])
(defn eval-and-realize-a-notespace [& args]
(let [anamespace (find-ns 'notespace.v3-experiment1-test)]
(api/init)
(actions/act-on-notes! anamespace [actions/eval-note!])
(actions/act-on-notes! anamespace [actions/eval-note!])
(gn/render-current-state! "/tmp/out.html") )
(System/exit 0) ) This works reliably. |
This test case is even better, as it produces 2 different html files, one bad, one good: (let [anamespace (find-ns 'notespace.v3-experiment1-test)]
(api/init)
(actions/act-on-notes! anamespace [actions/eval-note!])
(gn/render-current-state! "/tmp/out_bad.html")
(actions/act-on-notes! anamespace [actions/eval-note!])
(gn/render-current-state! "/tmp/out_good.html")
) |
Running this evaluates the notespace and generates html,
but the plots fail with
The text was updated successfully, but these errors were encountered: