Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error en get_sinim_cats(): "lexical error: invalid char in json text" #8

Open
bastianolea opened this issue Apr 19, 2024 · 3 comments

Comments

@bastianolea
Copy link

Hola! Al usar la función get_sinim_cats(), o cualquier otra del paquete, entrega un error:

> library(sinimr)
> get_sinim_cats()
Error: lexical error: invalid char in json text.
                                       <!DOCTYPE html> <html>     <hea
                     (right here) ------^

Información de sesión:

> sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.4.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Santiago
tzcode source: internal

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

other attached packages:
[1] sinimr_0.3.2

loaded via a namespace (and not attached):
 [1] utf8_1.2.4         generics_0.1.3     tidyr_1.3.1        class_7.3-22       KernSmooth_2.23-21 stringi_1.8.3      rsthemes_0.4.0    
 [8] hms_1.1.3          magrittr_2.0.3     grid_4.3.1         plyr_1.8.9         jsonlite_1.8.8     e1071_1.7-13       DBI_1.2.2         
[15] httr_1.4.7         purrr_1.0.2        fansi_1.0.6        XML_3.99-0.14      cli_3.6.2          rlang_1.1.3        crayon_1.5.2      
[22] units_0.8-2        bit64_4.0.5        withr_3.0.0        tools_4.3.1        parallel_4.3.1     reshape2_1.4.4     tzdb_0.4.0        
[29] dplyr_1.1.4        curl_5.2.0         assertthat_0.2.1   vctrs_0.6.5        R6_2.5.1           proxy_0.4-27       lifecycle_1.0.4   
[36] classInt_0.4-9     stringr_1.5.1      bit_4.0.5          vroom_1.6.3        arrow_13.0.0.1     pkgconfig_2.0.3    pillar_1.9.0      
[43] glue_1.7.0         Rcpp_1.0.12        sf_1.0-13          tibble_3.2.1       tidyselect_1.2.0   rstudioapi_0.15.0  readr_2.1.4       
[50] compiler_4.3.1    
@RRMaximiliano
Copy link

También obtengo el mismo error:

library(sinimr)
get_sinim_cats()
Error:
! lexical error: invalid char in json text.
                                       <!DOCTYPE html> <html>     <hea
                     (right here) ------^
Show Traceback  

Será relacionado a cambios en la web del SINIM?

@RRMaximiliano
Copy link

RRMaximiliano commented Jan 23, 2025

Una solución parcial, ocupando más o menos la misma lógica, mientrás hay alguna actualización del paquete. @bastianolea

https://gist.github.com/RRMaximiliano/ee65369679047baea7093af43d2434e6

@bastianolea
Copy link
Author

Excelente @RRMaximiliano, muchas gracias! Funciona perfecta tu solución

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants