choonghyunryu / dlookr

Tools for Data Diagnosis, Exploration, Transformation
https://choonghyunryu.github.io/dlookr/
208 stars 35 forks source link

Error in diagnose_report() #85

Open migueldc1 opened 1 year ago

migueldc1 commented 1 year ago

Hi @choonghyunryu ,

I am having the following error while running diagnose_report(), and having similar issues with eda_web_report()

Quitting from lines 537-543 (diagnosis_temp.Rmd) 
Error in `mutate()`:
! Problem while computing `n_character = nchar(value)`.
Caused by error in `nchar()`:
! invalid multibyte string, element 36
Backtrace:
  1. dlookr:::html_variable(reportData, theme = "orange", base_family = base_family)
 19. base::nchar(value)

My session info:

R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)

Matrix products: default

locale:
[1] LC_COLLATE=Spanish_Spain.utf8  LC_CTYPE=Spanish_Spain.utf8    LC_MONETARY=Spanish_Spain.utf8
[4] LC_NUMERIC=C                   LC_TIME=Spanish_Spain.utf8    

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

other attached packages:
[1] htmltools_0.5.3   reactable_0.3.0   kableExtra_1.3.4  dplyr_1.0.10      dlookr_0.6.1.9002

loaded via a namespace (and not attached):
 [1] httr_1.4.4        sass_0.4.2        tidyr_1.2.1       jsonlite_1.8.3    viridisLite_0.4.1
 [6] splines_4.2.2     showtext_0.9-5    bslib_0.4.1       Formula_1.2-4     shiny_1.7.3      
[11] assertthat_0.2.1  highr_0.9         showtextdb_3.0    yaml_2.3.6        gdtools_0.2.4    
[16] Rttf2pt1_1.3.11   pillar_1.8.1      lattice_0.20-45   glue_1.6.2        extrafontdb_1.0  
[21] digest_0.6.30     promises_1.2.0.1  rvest_1.0.3       colorspace_2.0-3  httpuv_1.6.6     
[26] Matrix_1.5-1      reactR_0.4.4      hrbrthemes_0.8.0  pkgconfig_2.0.3   sysfonts_0.8.8   
[31] purrr_0.3.5       xtable_1.8-4      mvtnorm_1.1-3     scales_1.2.1      webshot_0.5.4    
[36] svglite_2.1.0     later_1.3.0       tibble_3.1.8      farver_2.1.1      generics_0.1.3   
[41] ggplot2_3.3.6     ellipsis_0.3.2    withr_2.5.0       cachem_1.0.6      cli_3.4.1        
[46] survival_3.4-0    magrittr_2.0.3    mime_0.12         pagedown_0.19     evaluate_0.17    
[51] fansi_1.0.3       xml2_1.3.3        tools_4.2.2       lifecycle_1.0.3   stringr_1.4.1    
[56] munsell_0.5.0     compiler_4.2.2    jquerylib_0.1.4   inum_1.0-4        systemfonts_1.0.4
[61] rlang_1.0.6       grid_4.2.2        rstudioapi_0.14   htmlwidgets_1.5.4 base64enc_0.1-3  
[66] labeling_0.4.2    rmarkdown_2.17    partykit_1.2-16   gtable_0.3.1      DBI_1.1.3        
[71] curl_4.3.3        R6_2.5.1          gridExtra_2.3     knitr_1.40        fastmap_1.1.0    
[76] extrafont_0.18    utf8_1.2.2        libcoin_1.0-9     stringi_1.7.8     Rcpp_1.0.9       
[81] vctrs_0.5.0       rpart_4.1.19      tidyselect_1.2.0  xfun_0.34   

Thanks!

choonghyunryu commented 1 year ago

@Migueldc1,

Thanks for the feedback on the problem.

Perhaps this problem is caused by not being able to express Spanish. Could you please share some datasets?

The dlookr report is designed to work in English and Korean, but your help would be helpful in modifying it to output Spanish and other languages as well.

Thanks!

migueldc1 commented 1 year ago

Thank you for your reply, I tried using the mtcars database data(mtcars) as an example, but I got a new error that may be related to the previously described. Besides, my original dataset is also in English, but I updated R to the 4.2.2 version and started getting such errors.

pandoc.exe: C:\Users\Migueldc\AppData\Local\R\win-library\4.2\fontawesome\fontawesome\css\../webfonts/fa-v4compatibility.woff2: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1

I tried installing pandoc for windows (v 2.19.2) but still getting the same error...

choonghyunryu commented 1 year ago

@Migueldc1,

From the error message, it seems that the font file included in the fontawesome package cannot be found. Reinstall the fontawesome package and run it.

migueldc1 commented 1 year ago

@choonghyunryu I have tried doing this, also reinstalling R, trying older R versions, also the same with RStudio but with no luck. I will try today in other pc's...

migueldc1 commented 1 year ago

Hi @choonghyunryu I have managed to solve the issue!

With my first error you were absolutely right, i tried adding fileEncoding="latin1" when reading the data files, and now it works perfectly. With my second error, you were (again) right, I checked in another computer for this missing file, and I saw that it had installed a previous version of fontawesome, so I installed fontawesome 0.3.0 (instead of the last one), and now it works smoothly. However, now I get this warnings:

This Font Awesome icon ('arrow-alt-circle-up') does not exist:
* if providing a custom `html_dependency` these `name` checks can 
  be deactivated with `verify_fa = FALSE`
This Font Awesome icon ('arrow-alt-circle-up') does not exist:
* if providing a custom `html_dependency` these `name` checks can 
  be deactivated with `verify_fa = FALSE`
This Font Awesome icon ('arrow-alt-circle-up') does not exist:
* if providing a custom `html_dependency` these `name` checks can 
  be deactivated with `verify_fa = FALSE`
This Font Awesome icon ('arrow-alt-circle-up') does not exist:
* if providing a custom `html_dependency` these `name` checks can 
  be deactivated with `verify_fa = FALSE`
This Font Awesome icon ('arrow-alt-circle-up') does not exist:
* if providing a custom `html_dependency` these `name` checks can 
  be deactivated with `verify_fa = FALSE`
This Font Awesome icon ('arrow-alt-circle-down') does not exist:
* if providing a custom `html_dependency` these `name` checks can 
  be deactivated with `verify_fa = FALSE`
This Font Awesome icon ('arrow-alt-circle-up') does not exist:
* if providing a custom `html_dependency` these `name` checks can 
  be deactivated with `verify_fa = FALSE`
This Font Awesome icon ('arrow-alt-circle-down') does not exist:
* if providing a custom `html_dependency` these `name` checks can 
  be deactivated with `verify_fa = FALSE`
This Font Awesome icon ('arrows-alt-v') does not exist:
* if providing a custom `html_dependency` these `name` checks can 
  be deactivated with `verify_fa = FALSE`
This Font Awesome icon ('arrow-alt-circle-up') does not exist:
* if providing a custom `html_dependency` these `name` checks can 
  be deactivated with `verify_fa = FALSE`
.
.
.

I guess there is no problem with them, because the report looks fine, but I don't know what they mean either.

Again, thank you very much!

choonghyunryu commented 1 year ago

@Migueldc1,

I'm glad your problem has been resolved.

Even if a warning message occurs, it works without any problem. But it's just annoying. We will fix it in the next version.

choonghyunryu commented 1 year ago

@Migueldc1,

Note the following: https://github.com/rstudio/fontawesome/issues/95