DiagrammeR icon indicating copy to clipboard operation
DiagrammeR copied to clipboard

Error in `s$close()`: ! attempt to apply non-function

Open luifrancgom opened this issue 1 year ago • 0 comments

Description

I am trying to render a document in quarto as a beamer presentation and I get the following error: Error in s$close(): ! attempt to apply non-function

Minimal reproducible example:

--
title: "Untitled"
format: beamer
editor: visual
---

```{r}
#| echo: false
library(DiagrammeR)
```

# Test

```{r }
#| out-width: 90%
grViz("
digraph boxes_and_circles {

  graph [overlap = true, fontsize = 10]

  node [shape = box,
        fontname = Helvetica]
  A; B;

  node [shape = circle,
        fixedsize = true,
        width = 0.9]
  1; 2;

  A->1 B->2
}
")
```

Observations

I don't know if the error is related to chromote or to quarto taking into account that the problem disappears when the #| out-width: 90% is not included.

Also the problem disappears completely if you use as an OS Windows 11 Pro instead of Ubuntu 22.04.3 LTS

Bracktrace

Quitting from lines 15-33 [unnamed-chunk-2] (test.qmd) Error in s$close(): ! attempt to apply non-function Backtrace:

  1. global .main()
  2. execute(...)
  3. rmarkdown::render(...)
  4. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  5. knitr:::process_file(text, output) ...
  6. chromote:::synchronize(p, loop = private$child_loop)
  7. base::tryCatch(...)
  8. base (local) tryCatchList(expr, classes, parentenv, handlers)
  9. base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10. base (local) doTryCatch(return(expr), name, parentenv, handler)

Execution halted

Environment

OS: Ubuntu 22.04.3 LTS R: 4.3.2 (2023-10-31) -- "Eye Holes" IDE: RStudio 2023.12.0+369 "Ocean Storm" Release Quarto: 1.4.545 Google Chrome: 21.0.6167.85 (Official Build) (64-bit)

Packages

DiagrammeR: 1.0.10 knitr: 1.45 rmarkdown: 2.25 chromote: 0.1.2

luifrancgom avatar Jan 29 '24 18:01 luifrancgom