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

parse_raw() errors on empty input when tibble >= 3.0.0 #26

Open
rix133 opened this issue Nov 29, 2023 · 4 comments
Open

parse_raw() errors on empty input when tibble >= 3.0.0 #26

rix133 opened this issue Nov 29, 2023 · 4 comments
Labels

Comments

@rix133
Copy link

rix133 commented Nov 29, 2023

The call to ritis::terms gives an error

ritis::terms("Boleophthalmus dussumieri", what = "scientific")



Error:
! The `x` argument of `as_tibble()` can't be missing as of tibble
  3.0.0.
Session Info
> sessionInfo()
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default


locale:
[1] LC_COLLATE=Estonian_Estonia.utf8  LC_CTYPE=Estonian_Estonia.utf8   
[3] LC_MONETARY=Estonian_Estonia.utf8 LC_NUMERIC=C                     
[5] LC_TIME=Estonian_Estonia.utf8    

time zone: Europe/Tallinn
tzcode source: internal

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

other attached packages:
[1] taxize_0.9.100

loaded via a namespace (and not attached):
  [1] gridExtra_2.3        remotes_2.4.2.1      inline_0.3.19        sandwich_3.0-2      
  [5] readxl_1.4.3         rlang_1.1.2          magrittr_2.0.3       multcomp_1.4-25     
  [9] matrixStats_1.1.0    compiler_4.3.2       loo_2.6.0            callr_3.7.3         
 [13] vctrs_0.6.4          reshape2_1.4.4       httpcode_0.3.0       stringr_1.5.1       
 [17] pkgconfig_2.0.3      crayon_1.5.2         fastmap_1.1.1        backports_1.4.1     
 [21] ellipsis_0.3.2       pander_0.6.5         utf8_1.2.4           threejs_0.3.3       
 [25] promises_1.2.1       markdown_1.11        ps_1.7.5             xfun_0.41           
 [29] jsonlite_1.8.7       later_1.3.1          parallel_4.3.2       prettyunits_1.2.0   
 [33] R6_2.5.1             dygraphs_1.1.1.6     stringi_1.8.1        StanHeaders_2.26.28 
 [37] cellranger_1.1.0     estimability_1.4.1   knitr_1.45           iterators_1.0.14    
 [41] Rcpp_1.0.11          rstan_2.32.3         triebeard_0.4.1      zoo_1.8-12          
 [45] base64enc_0.1-3      bayesplot_1.10.0     httpuv_1.6.12        Matrix_1.6-3        
 [49] splines_4.3.2        igraph_1.5.1         tidyselect_1.2.0     rstudioapi_0.15.0   
 [53] abind_1.4-5          codetools_0.2-19     miniUI_0.1.1.1       curl_5.1.0          
 [57] processx_3.8.2       pkgbuild_1.4.2       lattice_0.22-5       tibble_3.2.1        
 [61] plyr_1.8.9           shiny_1.8.0          bridgesampling_1.1-2 posterior_1.5.0     
 [65] coda_0.19-4          survival_3.5-7       RcppParallel_5.1.7   xml2_1.3.5          
 [69] xts_0.13.1           pillar_1.9.0         ritis_1.0.0          tensorA_0.36.2      
 [73] foreach_1.5.2        checkmate_2.3.0      DT_0.30              stats4_4.3.2        
 [77] shinyjs_2.1.0        distributional_0.3.2 generics_0.1.3       ggplot2_3.4.4       
 [81] rstantools_2.3.1.1   munsell_0.5.0        scales_1.2.1         gtools_3.9.4        
 [85] xtable_1.8-4         glue_1.6.2           emmeans_1.8.9        tools_4.3.2         
 [89] shinystan_2.6.0      data.table_1.14.8    colourpicker_1.3.0   mvtnorm_1.2-3       
 [93] grid_4.3.2           bold_1.3.0           ape_5.7-1            urltools_1.7.3      
 [97] QuickJSR_1.0.7       crosstalk_1.2.0      colorspace_2.1-0     nlme_3.1-163        
[101] cli_3.6.1            fansi_1.0.5          solrium_1.2.0        Brobdingnag_1.2-9   
[105] dplyr_1.1.4          V8_4.4.0             gtable_0.3.4         digest_0.6.33       
[109] crul_1.4.0           TH.data_1.1-2        brms_2.20.4          htmlwidgets_1.6.3   
[113] farver_2.1.1         htmltools_0.5.7      lifecycle_1.0.4      mime_0.12           
[117] shinythemes_1.2.0    MASS_7.3-60 
@carolinetang77
Copy link

The same error occurs in ritis::full_record() and ritis::hierarchy_full():

ritis::full_record("175299")
Error:
! The `x` argument of `as_tibble()` can't be missing as of tibble 3.0.0.
ritis::hierarchy_full("175299")
Error:
! The `x` argument of `as_tibble()` can't be missing as of tibble 3.0.0.

@rix133
Copy link
Author

rix133 commented Nov 30, 2023

ok anyhow seems that the whole ITIS service is down right now and it does not handle this well

@rix133
Copy link
Author

rix133 commented Nov 30, 2023

so the input that the parse raw gets from ITIS json request is "" (empty string) and the tibble wants some input in here

ritis/R/zzz.R

Line 62 in 95f190c

return(tibble::as_tibble())

@jcblum
Copy link
Contributor

jcblum commented Dec 1, 2023

Thanks for noting the ITIS outage, @rix133, and for tracing this issue to the root cause. By the time I could investigate, I could no longer reproduce the error (since ITIS was responding again), so your follow-up was a big help!

tibble::tibble() returns an empty tibble, so I think that's the immediate fix here. However, I also think it would be nice if there was more user feedback that the ITIS request came back empty. I'm opening a separate feature issue for that.

@jcblum jcblum added the bug label Dec 1, 2023
@jcblum jcblum changed the title terms not compatible with tibble >= 3.0 parse_raw() errors on empty input when tibble >= 3.0.0 Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants