langcog / wordbankr

R package for accessing Wordbank
http://langcog.github.io/wordbankr/
30 stars 4 forks source link

error caused by rlang #19

Closed Kvonholzen closed 5 years ago

Kvonholzen commented 5 years ago

I haven't used wordbankr for about 3 weeks. Now, when executing basic wordbankr functions like get_administration_data() and get_instrument_data(), I'm getting errors related to rlang:

english_ws_admins <- get_administration_data("English (American)", "WS")
# >Error: `momed_id` = id must be a symbol or a string, not a formula
Call `rlang::last_error()` to see a backtrace

and

english_ws_items <- get_item_data("English (American)", "WS")
# > Error in filter_impl(.data, quo) : 
  Evaluation error: `as_dictionary()` is defunct as of rlang 0.3.0.
Please use `as_data_pronoun()` instead.

It appears rlang has recently been updated, which is probably causing the issues: https://github.com/r-lib/rlang/releases

Would it be possible to look in to this? Thanks in advance and for putting together this wonderful package!

mikabr commented 5 years ago

Thanks for bring this to our attention @Kvonholzen – do you think you could share the output of sessionInfo() for you when running into the issue? (I'm not getting it with rlang 0.3)

Kvonholzen commented 5 years ago

Absolutely! Here it is:

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.12.6 (Sierra)

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] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] bindrcpp_0.2    entropy_1.2.1   stringr_1.2.0   wordbankr_0.2.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.14     dbplyr_1.2.2     crayon_1.3.4     dplyr_0.7.4      assertthat_0.2.0
 [6] R6_2.2.2         DBI_1.0.0        magrittr_1.5     pillar_1.3.0     rlang_0.3.0.1   
[11] stringi_1.2.4    rstudioapi_0.8   RMySQL_0.10.9    tools_3.3.1      glue_1.2.0      
[16] purrr_0.2.4      pkgconfig_2.0.1  tidyselect_0.2.3 bindr_0.1.1      knitr_1.20      
[21] tibble_1.4.2  

I should mention, get_instruments() works without a problem.

mikabr commented 5 years ago

I would try upgrading to the newest released version of wordbankr (0.3.0) and seeing if that solves the issue.

Kvonholzen commented 5 years ago

Excellent suggestion, I've got it to work again. Thank you!

The underlying problem was that my R version was not new enough to handle the most recent version of wordbankr. An upgrade to both R and wordbankr did the trick.