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

Unable to get ecosystems using sealifebase server #302

Open
matteoloschi opened this issue Jan 30, 2025 · 0 comments
Open

Unable to get ecosystems using sealifebase server #302

matteoloschi opened this issue Jan 30, 2025 · 0 comments

Comments

@matteoloschi
Copy link

Hi,

I am writing to signal a problem using sealifebase as server in ecosystem() and species_by_ecosystem() functions. For example:

library(rfishbase)

ecosystem(server="sealifebase")
Error in `dplyr::collect()`:
! Failed to collect lazy table.
Caused by error in `duckdb_result()`:
! String contains null byte
Run `rlang::last_trace()` to see where the error occurred.

However, there is no error message using fishbase:

ecosystem(server="fishbase")
Joining with `by = join_by(Subfamily, GenCode, FamCode)`
Joining with `by = join_by(FamCode)`
Joining with `by = join_by(Order, Ordnum, Class, ClassNum)`
Joining with `by = join_by(Class, ClassNum)`
Joining with `by = join_by(SpecCode)`
# A tibble: 0 × 101
# ℹ 101 variables: autoctr <int>, E_CODE <int>, EcosystemRefno <int>, SpecCode <int>, Stockcode <int>, Status <chr>,
#   CurrentPresence <chr>, Abundance <chr>, LifeStage <chr>, Remarks.x <chr>, Entered.x <int>, DateEntered.x <dttm>,
#   Modified.x <int>, DateModified.x <dttm>, Expert.x <int>, DateChecked.x <dttm>, WebURL <chr>, TS.x <dttm>,
#   Species <chr>, EcosystemName <chr>, EcosystemType <chr>, MEOW <int>, LME <int>, MPA <int>, E_CODE_Large <int>,
#   E_CODE_Larger <int>, E_CODE_Largest <int>, E_CODE_Ecoregion <int>, MEOWCode <int>, MEOWLevel <chr>, Ready <int>,
#   OtherNames <chr>, Location <chr>, LocationMap <chr>, MapRef <int>, Salinity <chr>, RiverLength <int>, Area <int>,
#   SizeRef <int>, DrainageArea <int>, NorthernLat <int>, NrangeNS <chr>, SouthernLat <int>, SrangeNS <chr>, …
# ℹ Use `colnames()` to see all variable names

Similarly, following the example in the reference manual https://cran.r-project.org/web/packages/rfishbase/rfishbase.pdf#page=38 an error message is returned:

species_by_ecosystem(ecosystem = "Arctic", server = "sealifebase")
Error in `dplyr::collect()`:
! Failed to collect lazy table.
Caused by error in `duckdb_result()`:
! String contains null byte
Run `rlang::last_trace()` to see where the error occurred.

How can this be solved?

Thank you in advance

Session info
R version 4.4.2 (2024-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19045)

Matrix products: default


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

time zone: Europe/Rome
tzcode source: internal

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

other attached packages:
[1] dplyr_1.1.4     rfishbase_5.0.1

loaded via a namespace (and not attached):
 [1] vctrs_0.6.5      httr_1.4.7       cli_3.6.3        rlang_1.1.4      stringi_1.8.4    DBI_1.2.3       
 [7] purrr_1.0.2      generics_0.1.3   duckdbfs_0.0.9   jsonlite_1.8.9   glue_1.8.0       dbplyr_2.5.0    
[13] tibble_3.2.1     fastmap_1.2.0    lifecycle_1.0.4  memoise_2.0.1    duckdb_1.1.3-1   stringr_1.5.1   
[19] compiler_4.4.2   blob_1.2.4       fs_1.6.5         pkgconfig_2.0.3  R6_2.5.1         utf8_1.2.4      
[25] tidyselect_1.2.1 pillar_1.10.1    curl_6.1.0       magrittr_2.0.3   withr_3.0.2      tools_4.4.2     
[31] cachem_1.1.0
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

1 participant