ropensci / rfishbase

R interface to the fishbase.org database
https://docs.ropensci.org/rfishbase
109 stars 40 forks source link

Error with synonyms() function when server = "sealifebase" #244

Open kdgorospe opened 2 years ago

kdgorospe commented 2 years ago

The following works, regardless of whether the provided species name is a fish or not: rfishbase::synonyms("Argopecten irradians", server="fishbase")

But the following gives an error message: rfishbase::synonyms("Argopecten irradians", server="sealifebase")

Error in stop_subscript(): ! Can't subset columns that don't exist. x Column GEN_NAME doesn't exist.

sessionInfo() R version 4.0.1 (2020-06-06) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS 10.16

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

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

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

other attached packages: [1] rfishbase_4.0.0 artis_0.1.0 forcats_0.5.0
[4] stringr_1.4.0 dplyr_1.0.7 purrr_0.3.4
[7] readr_2.1.2 tidyr_1.1.2 tibble_3.1.6
[10] ggplot2_3.3.3 tidyverse_1.3.0 slam_0.1-47
[13] reticulate_1.16 Matrix_1.2-18 magrittr_2.0.2
[16] data.table_1.13.6

loaded via a namespace (and not attached): [1] httr_1.4.2 pkgload_1.1.0 contentid_0.0.15 [4] bit64_4.0.5 vroom_1.5.7 jsonlite_1.7.3
[7] modelr_0.1.8 assertthat_0.2.1 askpass_1.1
[10] countrycode_1.2.0 cellranger_1.1.0 remotes_2.2.0
[13] progress_1.2.2 sessioninfo_1.1.1 pillar_1.7.0
[16] backports_1.2.1 lattice_0.20-41 glue_1.6.1
[19] rvest_0.3.6 colorspace_2.0-0 pkgconfig_2.0.3
[22] devtools_2.3.1 broom_0.7.2 haven_2.3.1
[25] scales_1.1.1 processx_3.4.5 tzdb_0.2.0
[28] openssl_1.4.6 generics_0.1.2 usethis_1.6.1
[31] ellipsis_0.3.2 cachem_1.0.6 withr_2.4.3
[34] cli_3.1.1 crayon_1.4.2 readxl_1.3.1
[37] memoise_2.0.1 ps_1.5.0 fs_1.5.2
[40] fansi_1.0.2 xml2_1.3.2 pkgbuild_1.2.0
[43] tools_4.0.1 prettyunits_1.1.1 hms_1.1.1
[46] lifecycle_1.0.1 munsell_0.5.0 reprex_0.3.0
[49] callr_3.5.1 packrat_0.5.0 compiler_4.0.1
[52] duckdb_0.3.1-1 rlang_1.0.0 grid_4.0.1
[55] rstudioapi_0.13 testthat_3.0.2 gtable_0.3.0
[58] DBI_1.1.2 curl_4.3.2 R6_2.5.1
[61] lubridate_1.7.9.2 bit_4.0.4 fastmap_1.1.0
[64] utf8_1.2.2 rprojroot_2.0.2 desc_1.2.0
[67] stringi_1.7.6 Rcpp_1.0.6 vctrs_0.3.8
[70] dbplyr_2.1.1 tidyselect_1.1.1

Dengaloo commented 2 years ago

Hi Kelvin

Please use @. @.> . This email address is my personal address and I don’t often consult it.

Just so happens that I have it open now, and I just saw your email drop.

Thanks

Deng

From: Kelvin Gorospe @.> Sent: Friday, February 18, 2022 11:45 AM To: ropensci/rfishbase @.> Cc: Subscribed @.***> Subject: [ropensci/rfishbase] Error with synonyms() function when server = "sealifebase" (Issue #244)

The following works, regardless of whether the provided species name is a fish or not: rfishbase::synonyms("Argopecten irradians", server="fishbase")

But the following gives an error message: rfishbase::synonyms("Argopecten irradians", server="sealifebase")

Error in stop_subscript(): ! Can't subset columns that don't exist. x Column GEN_NAME doesn't exist.

sessionInfo() R version 4.0.1 (2020-06-06) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS 10.16

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

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

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

other attached packages: [1] rfishbase_4.0.0 artis_0.1.0 forcats_0.5.0 [4] stringr_1.4.0 dplyr_1.0.7 purrr_0.3.4 [7] readr_2.1.2 tidyr_1.1.2 tibble_3.1.6 [10] ggplot2_3.3.3 tidyverse_1.3.0 slam_0.1-47 [13] reticulate_1.16 Matrix_1.2-18 magrittr_2.0.2 [16] data.table_1.13.6

loaded via a namespace (and not attached): [1] httr_1.4.2 pkgload_1.1.0 contentid_0.0.15 [4] bit64_4.0.5 vroom_1.5.7 jsonlite_1.7.3 [7] modelr_0.1.8 assertthat_0.2.1 askpass_1.1 [10] countrycode_1.2.0 cellranger_1.1.0 remotes_2.2.0 [13] progress_1.2.2 sessioninfo_1.1.1 pillar_1.7.0 [16] backports_1.2.1 lattice_0.20-41 glue_1.6.1 [19] rvest_0.3.6 colorspace_2.0-0 pkgconfig_2.0.3 [22] devtools_2.3.1 broom_0.7.2 haven_2.3.1 [25] scales_1.1.1 processx_3.4.5 tzdb_0.2.0 [28] openssl_1.4.6 generics_0.1.2 usethis_1.6.1 [31] ellipsis_0.3.2 cachem_1.0.6 withr_2.4.3 [34] cli_3.1.1 crayon_1.4.2 readxl_1.3.1 [37] memoise_2.0.1 ps_1.5.0 fs_1.5.2 [40] fansi_1.0.2 xml2_1.3.2 pkgbuild_1.2.0 [43] tools_4.0.1 prettyunits_1.1.1 hms_1.1.1 [46] lifecycle_1.0.1 munsell_0.5.0 reprex_0.3.0 [49] callr_3.5.1 packrat_0.5.0 compiler_4.0.1 [52] duckdb_0.3.1-1 rlang_1.0.0 grid_4.0.1 [55] rstudioapi_0.13 testthat_3.0.2 gtable_0.3.0 [58] DBI_1.1.2 curl_4.3.2 R6_2.5.1 [61] lubridate_1.7.9.2 bit_4.0.4 fastmap_1.1.0 [64] utf8_1.2.2 rprojroot_2.0.2 desc_1.2.0 [67] stringi_1.7.6 Rcpp_1.0.6 vctrs_0.3.8 [70] dbplyr_2.1.1 tidyselect_1.1.1

— Reply to this email directly, view it on GitHub https://github.com/ropensci/rfishbase/issues/244 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYGXU4XRRGVQIOZCNYHEITU32OTJANCNFSM5OY4X4OA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Dengaloo commented 2 years ago

Hi again Kelvin,

Sorry, please ignore that request. I thought you were sending this for the DWF stuff.

Thanks

Deng

From: Kelvin Gorospe @.> Sent: Friday, February 18, 2022 11:45 AM To: ropensci/rfishbase @.> Cc: Subscribed @.***> Subject: [ropensci/rfishbase] Error with synonyms() function when server = "sealifebase" (Issue #244)

The following works, regardless of whether the provided species name is a fish or not: rfishbase::synonyms("Argopecten irradians", server="fishbase")

But the following gives an error message: rfishbase::synonyms("Argopecten irradians", server="sealifebase")

Error in stop_subscript(): ! Can't subset columns that don't exist. x Column GEN_NAME doesn't exist.

sessionInfo() R version 4.0.1 (2020-06-06) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS 10.16

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

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

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

other attached packages: [1] rfishbase_4.0.0 artis_0.1.0 forcats_0.5.0 [4] stringr_1.4.0 dplyr_1.0.7 purrr_0.3.4 [7] readr_2.1.2 tidyr_1.1.2 tibble_3.1.6 [10] ggplot2_3.3.3 tidyverse_1.3.0 slam_0.1-47 [13] reticulate_1.16 Matrix_1.2-18 magrittr_2.0.2 [16] data.table_1.13.6

loaded via a namespace (and not attached): [1] httr_1.4.2 pkgload_1.1.0 contentid_0.0.15 [4] bit64_4.0.5 vroom_1.5.7 jsonlite_1.7.3 [7] modelr_0.1.8 assertthat_0.2.1 askpass_1.1 [10] countrycode_1.2.0 cellranger_1.1.0 remotes_2.2.0 [13] progress_1.2.2 sessioninfo_1.1.1 pillar_1.7.0 [16] backports_1.2.1 lattice_0.20-41 glue_1.6.1 [19] rvest_0.3.6 colorspace_2.0-0 pkgconfig_2.0.3 [22] devtools_2.3.1 broom_0.7.2 haven_2.3.1 [25] scales_1.1.1 processx_3.4.5 tzdb_0.2.0 [28] openssl_1.4.6 generics_0.1.2 usethis_1.6.1 [31] ellipsis_0.3.2 cachem_1.0.6 withr_2.4.3 [34] cli_3.1.1 crayon_1.4.2 readxl_1.3.1 [37] memoise_2.0.1 ps_1.5.0 fs_1.5.2 [40] fansi_1.0.2 xml2_1.3.2 pkgbuild_1.2.0 [43] tools_4.0.1 prettyunits_1.1.1 hms_1.1.1 [46] lifecycle_1.0.1 munsell_0.5.0 reprex_0.3.0 [49] callr_3.5.1 packrat_0.5.0 compiler_4.0.1 [52] duckdb_0.3.1-1 rlang_1.0.0 grid_4.0.1 [55] rstudioapi_0.13 testthat_3.0.2 gtable_0.3.0 [58] DBI_1.1.2 curl_4.3.2 R6_2.5.1 [61] lubridate_1.7.9.2 bit_4.0.4 fastmap_1.1.0 [64] utf8_1.2.2 rprojroot_2.0.2 desc_1.2.0 [67] stringi_1.7.6 Rcpp_1.0.6 vctrs_0.3.8 [70] dbplyr_2.1.1 tidyselect_1.1.1

— Reply to this email directly, view it on GitHub https://github.com/ropensci/rfishbase/issues/244 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYGXU4XRRGVQIOZCNYHEITU32OTJANCNFSM5OY4X4OA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . You are receiving this because you are subscribed to this thread.Message ID: @.***>

cboettig commented 1 year ago

Should be working in the 4.1.0

cottrellr commented 1 year ago

I'm using rfishbase 4.1.1 but I am getting this above message too. Only happens when using "sealifebase" server:

rfishbase::common_to_sci(x = c("Whiteleg shrimp", "Fleshy prawn", "Banana prawn", "Giant tiger prawn", "Kuruma prawn"), server = "sealifebase")

Error inselect(): ! Can't subset columns that don't exist. ✖ ColumnGEN_NAMEdoesn't exist. Runrlang::last_trace()to see where the error occurred.

Any clues? Thanks

cboettig commented 1 year ago

@cottrellr apologies for the slow reply, I still can't reproduce this error. can you provide sessionInfo() output?

maybe also try:

unlink(rfishbase::db_dir())
JZamborain-Mason commented 1 year ago

Hi @cboettig

Hope this message finds you well

I was running into the same issue using rfishbase 4.0.0 and server "sealifebase" when using validate_names(). When I updated the package to 4.1.1 (as suggested), the validate_names() function worked (great-thanks for that!). However, with the updated package the synonyms function stops functioning for me only when using "fishbase" (i.e., it works with server="sealifebase"). Instead of getting the GEN_NAME error, I now het the WoRMS ID error.

rfishbase::synonyms("Naso brevirostris") Error in select(): ! Can't subset columns that don't exist. ✖ Column WoRMS_ID doesn't exist. Run rlang::last_error() to see where the error occurred.

Any idea how to fix this? I want the validate_names() but also the synonyms() Thanks! :)

**EDIT: I also have problems with the load_taxa() function (not with sealifebase but yes with fishbase)"

rfishbase::load_taxa() Error in select(): ! Can't subset columns that don't exist. ✖ Column GenName doesn't exist. Run rlang::last_error() to see where the error occurred.


sessionInfo() R version 4.2.1 (2022-06-23 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19045)

Matrix products: default

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

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

loaded via a namespace (and not attached): [1] pillar_1.8.1 compiler_4.2.1 dbplyr_2.2.1 prettyunits_1.1.1 tools_4.2.1 progress_1.2.2 contentid_0.0.15 [8] rfishbase_4.1.1 jsonlite_1.8.0 memoise_2.0.1 lifecycle_1.0.3 tibble_3.1.8 pkgconfig_2.0.3 rlang_1.0.6
[15] DBI_1.1.3 cli_3.4.0 rstudioapi_0.14 curl_4.3.2 fastmap_1.1.0 withr_2.5.0 duckdb_0.5.1
[22] dplyr_1.0.10 stringr_1.4.1 httr_1.4.4 askpass_1.1 generics_0.1.3 fs_1.5.2 vctrs_0.5.1
[29] hms_1.1.2 tidyselect_1.2.0 glue_1.6.2 R6_2.5.1 fansi_1.0.3 purrr_0.3.4 readr_2.1.2
[36] tzdb_0.3.0 magrittr_2.0.3 ellipsis_0.3.2 assertthat_0.2.1 utf8_1.2.2 stringi_1.7.8 openssl_2.0.4

rachelthoms commented 3 months ago

Also having this issue with validate_names and common_names

Error in `select()`:
! Can't select columns that don't exist.
✖ Column `GEN_NAME` doesn't exist.
Backtrace:
  1. rfishbase::common_names(slb_data$Scientific.Name, server = "sealifebase")
 24. dplyr:::select.data.frame(...)
Error in select(., "GenCode", Genus = "GEN_NAME", GenusCommonName = "CommonName",  :