plotly / plotly/plotly.R

Error when rendering plotly with tidyverse 1.3.2 in shiny

Abierto
#2,190 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
R
Estrellas
2.7k
Forks
641
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I've run into issues with displaying a simple plotly output in shiny when I install the latest tidyverse (1.3.2). The issue does not appear with tidyverse 1.3.1, or if I do not install tidyverse.

I also reported it to the tidyverse repo: https://github.com/tidyverse/tidyverse/issues/303

I've only installed plotly, shiny, and tidyverse.
I get the following error:

Warning: Error in vec_as_location: `...` must be empty.
✖ Problematic argument:
• call = call
  119: <Anonymous>
  118: signalCondition
  117: signal_abort
  116: action
  114: action_dots
  113: ellipsis::check_dots_empty
  112: vec_as_location
  109: vectbl_as_col_location
  108: [.tbl_df
  105: <Anonymous>
  104: mapply
  103: Map
  102: plotly_build.plotly
   98: getFromNamespace("prepareWidget", "plotly")
   97: shinyRenderWidget
   96: func
   83: renderFunc
   82: output$test_graph
    1: shiny::runApp
Input to asJSON(keep_vec_names=TRUE) is a named vector. In a future version of jsonlite, this option will not be supported, and named vectors will be translated into arrays instead of objects. If you want JSON object output, please use a named list instead. See ?toJSON.

when running this simple script:

library(shiny)
library(plotly)

ui <- fluidPage(plotlyOutput('test_graph'))

server <- function(input, output, session){
  
  output$test_graph <- renderPlotly({
    x <- c(1:100)
    random_y <- rnorm(100, mean = 0)
    data <- data.frame(x, random_y)
    
    fig <- plot_ly(data, x = ~x, y = ~random_y, type = 'scatter', mode = 'lines')
    
    fig
  })
}

shinyApp(ui = ui, server = server)

I have the following R version and packages installed:
R version

platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 4
minor 1.1
year 2021
month 08
day 10
svn rev 80725
language R
version.string R version 4.1.1 (2021-08-10)
nickname Kick Things

Packages

Package Version Package Version Package Version
AnnotationDbi 1.54.1 fs 1.5.0 ps 1.6.0
AnnotationFilter 1.16.0 futile.logger 1.4.3 purrr 0.3.4
askpass 1.1 futile.options 1.0.1 R6 2.5.1
assertthat 0.2.1 gargle 1.2.0 rappdirs 0.3.3
backports 1.2.1 generics 0.1.0 RColorBrewer 1.1-2
bamsignals 1.24.0 GenomeInfoDb 1.28.4 Rcpp 1.0.7
base64enc 0.1-3 GenomeInfoDbData 1.2.6 RCurl 1.98-1.5
bezier 1.1.2 GenomicAlignments 1.28.0 readr 2.1.2
BH 1.75.0-0 GenomicFeatures 1.44.2 readxl 1.3.1
Biobase 2.52.0 GenomicRanges 1.44.0 regioneR 1.24.0
BiocFileCache 2.0.0 getopt 1.20.3 rematch 1.0.1
BiocGenerics 0.38.0 ggplot2 3.3.5 rematch2 2.1.2
BiocIO 1.2.0 glue 1.6.2 reprex 2.0.1
BiocManager 1.30.16 googledrive 2.0.0 restfulr 0.0.13
BiocParallel 1.26.2 googlesheets4 1.0.0 Rhtslib 1.24.0
BiocVersion 3.13.1 gridExtra 2.3 rjson 0.2.20
biomaRt 2.48.3 gtable 0.3.0 rlang 1.0.4
Biostrings 2.60.2 haven 2.4.3 Rsamtools 2.8.0
biovizBase 1.40.0 highr 0.9 RSQLite 2.2.8
bit 4.0.4 Hmisc 4.5-0 rstudioapi 0.13
bit64 4.0.5 hms 1.1.1 rtracklayer 1.52.1
bitops 1.0-7 htmlTable 2.2.1 rvest 1.0.2
blob 1.2.2 htmltools 0.5.2 S4Vectors 0.30.1
broom 1.0.0 htmlwidgets 1.5.4 sass 0.4.2
BSgenome 1.60.0 httpuv 1.6.5 scales 1.1.1
bslib 0.4.0 httr 1.4.2 selectr 0.4-2
cachem 1.0.6 ids 1.0.1 shiny 1.7.2
callr 3.7.0 IRanges 2.26.0 snow 0.4-3
cellranger 1.1.0 isoband 0.2.5 sourcetools 0.1.7
checkmate 2.0.0 jpeg 0.1-9 stringi 1.7.4
cli 3.3.0 jquerylib 0.1.4 stringr 1.4.0
clipr 0.8.0 jsonlite 1.7.2 SummarizedExperiment 1.22.0
colorout 1.2-2 karyoploteR 1.18.0 sys 3.4
colorspace 2.0-2 KEGGREST 1.32.0 tibble 3.1.8
commonmark 1.8.0 labeling 0.4.2 tidyr 1.1.4
cpp11 0.4.0 lambda.r 1.2.4 tidyselect 1.1.1
crayon 1.5.1 later 1.3.0 tidyverse 1.3.2
crosstalk 1.2.0 latticeExtra 0.6-29 tinytex 0.34
curl 4.3.2 lazyeval 0.2.2 tzdb 0.1.2
data.table 1.14.2 lifecycle 1.0.1 utf8 1.2.2
DBI 1.1.1 lubridate 1.8.0 uuid 0.1-4
dbplyr 2.1.1 magrittr 2.0.1 VariantAnnotation 1.38.0
DelayedArray 0.18.0 MatrixGenerics 1.4.3 vctrs 0.3.8
dichromat 2.0-0 matrixStats 0.61.0 viridis 0.6.1
digest 0.6.28 memoise 2.0.0 viridisLite 0.4.0
docopt 0.7.1 mime 0.12 vroom 1.5.7
dplyr 1.0.7 modelr 0.1.8 withr 2.4.2
dtplyr 1.2.1 munsell 0.5.0 xfun 0.26
ellipsis 0.3.2 openssl 1.4.5 XML 3.99-0.8
ensembldb 2.16.4 pillar 1.8.0 xml2 1.3.3
evaluate 0.14 pkgconfig 2.0.3 xtable 1.8-4
fansi 0.5.0 plogr 0.2.0 XVector 0.32.0
farver 2.1.0 plotly 4.10.0 yaml 2.2.1
fastmap 1.1.0 png 0.1-7 zlibbioc 1.38.0
filelock 1.0.2 prettyunits 1.1.1 littler 0.3.12
fontawesome 0.3.0 processx 3.5.2
forcats 0.5.1 progress 1.2.2
formatR 1.11 promises 1.2.0.1
Formula 1.2-4 ProtGenerics 1.24.0

I've identified these differences in installed packages when I install install.packages('tidyverse', repos='https://cloud.r-project.org/') vs install.packages('https://cran.r-project.org/src/contrib/Archive/tidyverse/tidyverse_1.3.1.tar.gz', repos=NULL, type='source'):

Packages v1.3.2 v1.3.1
broom 1.0.0 0.7.9
cli 3.3.0 3.0.1
clipr 0.8.0 not installed
crayon 1.5.1 1.4.1
dtplyr 1.2.1 1.1.0
glue 1.6.2 1.4.2
lubridate 1.8.0 1.7.10
pillar 1.8.0 1.6.3
readr 2.1.2 2.0.2
rlang 1.0.4 0.4.11
rvest 1.0.2 1.0.1
tibble 3.1.8 3.1.5
tidyverse 1.3.2 1.3.1
vroom 1.5.7 1.5.5
xml2 1.3.3 1.3.2

But I haven't looked further into this.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza ejecutando el script mínimo de shiny del issue con plotly 4.10.0 y tidyverse 1.3.2; después, sigue el stack trace a través de plotly_build.plotly y getFromNamespace("prepareWidget", "plotly"). Compara el comportamiento con tidyverse 1.3.1 y con las diferencias entre versiones de paquetes indicadas en el informe. Se considera terminado cuando el ejemplo se renderiza sin el error vec_as_location con tidyverse 1.3.2.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
r
Área
data-visualization
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.