lifewatch / lwdataexplorer

R package to access the data from LifeWatch Data Explorer
https://lifewatch.github.io/lwdataexplorer
Other
2 stars 1 forks source link

database connection does not work on rstudio.lifewatch.be #10

Closed LennertSchepers closed 2 years ago

LennertSchepers commented 2 years ago

Hi all, I wanted to report two different error messages while trying to retrieve data on rstudio.lifewatch.be

 > zooscandata <- getZooscanData("2011-01-01", "2021-04-14") # Only data
- Query mode: Database connection
Error in (function (uri = "mongodb://127.0.0.1", pem_file = NULL, pem_pwd = NULL,  : 
  failed to parse URI: 0 (Invalid URI Schema, expecting 'mongodb://' or 'mongodb+srv://')
Error in (function (uri = "mongodb://127.0.0.1", pem_file = NULL, pem_pwd = NULL,  : 
  failed to parse URI: 0 (Invalid URI Schema, expecting 'mongodb://' or 'mongodb+srv://')
Error in lw_mdf_is_string(mdf, input, par) : No connection to mongodb
> stationdata <- getStationData("2019-07-22", "2019-07-23", stations = "all", categories = "all")
- Query mode: Database connection
Date passed as text. Trying to transform to date
ERROR: The server seems unavailable. Please contact the package maintainer if the issue persists: <tjess@vliz.be>
Warning message:
In lw_mdf_is_string(mdf, input, par) :
  Something unexpected happened. Check the server logs.

My environment:

> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/libblas/libblas.so.3.0
LAPACK: /usr/lib/lapack/liblapack.so.3.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] lwdataexplorer_0.0.0.9000 lifecycle_1.0.1          

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.7         magrittr_2.0.1     tidyselect_1.1.0   xtable_1.8-4       R6_2.5.1           rlang_0.4.12      
 [7] fastmap_1.1.0      fansi_0.5.0        stringr_1.4.0      dplyr_1.0.2        tools_3.6.3        packrat_0.5.0     
[13] utf8_1.2.2         cli_3.1.0          htmltools_0.5.2    ellipsis_0.3.2     digest_0.6.29      tibble_3.1.6      
[19] mongolite_2.4.1    crayon_1.4.2       shiny_1.7.1        later_1.3.0        purrr_0.3.4        lwdataserver_0.1.0
[25] tidyr_1.1.2        promises_1.2.0.1   RODBC_1.3-16       vctrs_0.3.8        bitops_1.0-7       RCurl_1.98-1.5    
[31] mime_0.12          glue_1.5.1         stringi_1.7.6      compiler_3.6.3     pillar_1.6.4       generics_0.0.2    
[37] jsonlite_1.7.2     httpuv_1.6.3       pkgconfig_2.0.3   
salvafern commented 2 years ago

This is most likely happening cause running the package on RStudio lifewatch requires of some secrets. It is in on my to do list to improve the error messages and the documentation about this. @LennertSchepers Ask me privately and I'll explain more.