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

Plot from RCall fail with Random not imported error #212

Closed
felixcremer opened this issue Nov 25, 2024 · 1 comment
Closed

Plot from RCall fail with Random not imported error #212

felixcremer opened this issue Nov 25, 2024 · 1 comment

Comments

@felixcremer
Copy link

When I am trying to plot from RCall in Quarto this fails when launching Quarto from the shell but works when running the QuartoNotebookRunner from Julia

This is the error:

ERROR: Julia server returned error after receiving "run" command:
Failed to run notebook: /home/fcremer/Documents/NFDI4Earth/lhbarticles/rplot.qmd
ERROR: EvaluationError: Encountered 1 error during evaluation

Error 1 of 1
@ /home/fcremer/Documents/NFDI4Earth/lhbarticles/rplot.qmd:16
Error showing value of type QuartoNotebookWorker.SVG
UndefVarError: `Random` not defined in `QuartoNotebookWorker`
Suggestion: check for spelling errors or missing imports.
Hint: Random is loaded but not imported in the active module Main.

ERROR: Internal julia server error

Stack trace:
    at writeJuliaCommand (file:///opt/quarto/bin/quarto.js:41397:19)
    at eventLoopTick (ext:core/01_core.js:175:7)
    at async executeJulia (file:///opt/quarto/bin/quarto.js:41291:22)
    at async Object.execute (file:///opt/quarto/bin/quarto.js:41028:20)
    at async renderExecute (file:///opt/quarto/bin/quarto.js:85764:27)
    at async renderFileInternal (file:///opt/quarto/bin/quarto.js:85932:43)
    at async renderFiles (file:///opt/quarto/bin/quarto.js:85800:17)
    at async render (file:///opt/quarto/bin/quarto.js:90702:21)
    at async Command.actionHandler (file:///opt/quarto/bin/quarto.js:90850:32)
    at async Command.execute (file:///opt/quarto/bin/quarto.js:8099:13)

I managed to fix this error, by inserting an import Random into the QuartoNotebookWorker code, but now the output is empty.
See #210 for some of the discussion.

@felixcremer
Copy link
Author

Sorry, I haven't seen your PR.

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

1 participant