Quarto rendering on shiny-server errors saying `ojs_define`is not defined.

I have a quarto document with Python and OJS code and uses the ojs_define() function to pass data from Python to OJS. It that works fine on Rstudio server, but when I try view it in shiny-server, I get the error below stating that ojs_define is not defined:

processing file: index.qmd
Quitting from lines 16-66 (index.qmd)
Warning: Error in py_call_impl: NameError: name 'ojs_define' is not defined
Run `reticulate::py_last_error()` for details.

This document states that

Note that we could have done the same thing using Python (the ojs_define function is available in any document that uses R or Python).

I tried adding library(quarto) to my quarto file, but I still get the same error.

Can you share what your document looks like ? Or build an example document that reproduce the problem ?

The fact it works on RStudio Server, but don't on shiny server make me wonder what the difference could be. :thinking: Are you rendering with the same command and same options in both environment ?

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.