datastorm-open / shinymanager

Simple and secure authentification mechanism for single shiny applications.
https://datastorm-open.github.io/shinymanager/
386 stars 79 forks source link

Error: Cannot unclass an environment #66

Closed JuKo007 closed 3 years ago

JuKo007 commented 3 years ago

When I try to run the example from the repo I get the following error:

Listening on http://127.0.0.1:3743
Warning: Error in unclass: cannot unclass an environment
  77: upgrade_tokens
  76: as.tokens.tokens
  74: docvars.tokens
  71: $.tokens
  69: ui

My Session info is:

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 20

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=de_DE.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=de_DE.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base 

EDIT: I narrowed the error down as it only happens when library(quanteda) is run when setting up the server. The issue might be that the the internal class .tokens from shinymanager is conflicting with the function tokens() from quanteda, as suggested in this post: https://www.mail-archive.com/r-help-es@r-project.org/msg06121.html

pvictor commented 3 years ago

Thanks,

That's caused by the print.tokens method from quanteda, I don't see right now another solution than changing our tokens class to something more specific.

Victor

bthieurmel commented 3 years ago

Fix now on master. Thanks @pvictor

bes827 commented 3 years ago

I have the same problem with lexRankr package. Is it likely the same reason? and can you think of a way to fix it? thank you