Azure / Microsoft365R

R SDK for interacting with Microsoft 365 APIs
Other
313 stars 44 forks source link

Error with `list_` functions #58

Closed Olisidecar closed 3 years ago

Olisidecar commented 3 years ago

I'm encountering a function error when trying to use any of the list_ functions or the get_sharepoint_site() function in Microsoft365R.

I receive the console error:

Error in make_basic_list(self, "joinedTeams", filter, n) : could not find function "make_basic_list"

The get_business_onedrive() function appears to be working.

This error began following a fresh package install and re-authorisation, as I had been granted access to an external organisation's sharepoint site. I cannot find any reference to the make_basic_list() function in any documentation so cannot determine if I have missing package dependencies.

Any help is welcome!

System spec: R-4.0.5 Windows 10

hongooi73 commented 3 years ago

Check that you still get this error in a new session. It looks like you have functions in the global environment that are masking the package.

yonicd commented 3 years ago

I get the same error

si ```r - Session info -------------------------------------------------------------- setting value version R version 4.1.0 (2021-05-18) os Windows 10 x64 system x86_64, mingw32 ui RStudio language (EN) collate English_United States.1252 ctype English_United States.1252 tz America/New_York date 2021-06-09 - Packages ------------------------------------------------------------------ ! package * version date lib source P askpass 1.1 2019-01-13 [?] CRAN (R 4.1.0) P assertthat 0.2.1 2019-03-21 [?] CRAN (R 4.1.0) AzureAuth 1.3.2 2021-05-19 [1] standard (@1.3.2) AzureGraph 1.3.1 2021-06-04 [1] standard (@1.3.1) P backports 1.1.10 2020-09-15 [?] CRAN (R 4.1.0) P cli 2.5.0 2021-04-26 [?] CRAN (R 4.1.0) P clipr 0.7.0 2019-07-23 [?] CRAN (R 4.1.0) P crayon 1.4.1 2021-02-08 [?] CRAN (R 4.1.0) curl 4.3 2019-12-02 [1] CRAN (R 4.1.0) P desc 1.2.0 2018-05-01 [?] CRAN (R 4.1.0) P details 0.2.1 2020-01-12 [?] CRAN (R 4.1.0) P httr 1.4.2 2020-07-20 [?] CRAN (R 4.1.0) P jsonlite 1.7.2 2020-12-09 [?] CRAN (R 4.1.0) P knitr 1.30 2020-09-22 [?] CRAN (R 4.1.0) P magrittr 2.0.1 2020-11-17 [?] standard (@2.0.1) P Microsoft365R * 2.2.0 2021-06-09 [?] Github (Azure/Microsoft365R@2d7d43a) openssl 1.4.3 2020-09-18 [1] CRAN (R 4.1.0) P png 0.1-7 2013-12-03 [?] CRAN (R 4.1.0) P R6 2.5.0 2020-10-28 [?] CRAN (R 4.1.0) rappdirs 0.3.1 2016-03-28 [1] CRAN (R 4.1.0) renv 0.13.2 2021-03-30 [1] CRAN (R 4.1.0) P rprojroot 1.3-2 2018-01-03 [?] CRAN (R 4.1.0) P sessioninfo 1.1.1 2018-11-05 [?] CRAN (R 4.1.0) P withr 2.3.0 2020-09-22 [?] CRAN (R 4.1.0) P xfun 0.18 2020-09-29 [?] CRAN (R 4.1.0) P xml2 1.3.2 2020-04-23 [?] CRAN (R 4.1.0) [1] C:/trials/217-cross-study/renv/library/R-4.1/x86_64-w64-mingw32 [2] C:/Users/jonathan.sidi/AppData/Local/Temp/RtmpgBMikt/renv-system-library P -- Loaded and on-disk path mismatch. ```


yonicd commented 3 years ago

it looks like this function isnt set as @export. https://github.com/Azure/Microsoft365R/blob/4b9909aee30a888f336fed13f55691aa8fe72cd7/R/Microsoft365R.R#L80

if i put it in my global env it then the parent functions work

eveyp commented 3 years ago

I'm running into this when trying to use Microsoft365R in a package.

I've imported the whole Microsoft365R package (ie. #' @import Microsoft365R), but still get could not find function "make_basic_list" when using get_team in my package.