rstudio / pins-r

Pin, discover, and share resources
https://pins.rstudio.com
Other
312 stars 63 forks source link

Can't download files using board_azure #597

Closed MislavSag closed 1 year ago

MislavSag commented 2 years ago

Hi,

I have just startd with pin.

I have created board for Azure:

board  <- board_azure(
  container = storage_container(endpoint, "fmpcloud-daily"),
  path = "",
  n_processes = 10,
  versioned = TRUE,
  cache = file.path("D:/findata_cache")
)

I list all available files:

board_files <- board %>% pin_list()

but when I check if file exist:

pin_exists(board, board_files[1])

I get FALSE. For the same reason I can't download and read files. I have also trie to remove extension.

seesion info:

R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

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

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

other attached packages:
 [1] pins_1.0.1           R.cache_0.15.0       findata_0.1.0        zip_2.2.0            readr_2.1.0          QuantTools_0.5.7.1  
 [7] RcppQuantuccia_0.1.0 data.table_1.14.2    httr_1.4.2           AzureStor_3.5.2     

loaded via a namespace (and not attached):
 [1] tidyselect_1.1.1  xfun_0.28         purrr_0.3.4       vctrs_0.3.8       testthat_3.1.0    htmltools_0.5.2   yaml_2.2.1        utf8_1.2.2       
 [9] rlang_0.4.12      R.oo_1.24.0       AzureRMR_2.4.3    pillar_1.6.4      R.utils_2.11.0    glue_1.5.0        withr_2.4.2       selectr_0.4-2    
[17] rappdirs_0.3.3    bit64_4.0.5       lifecycle_1.0.1   stringr_1.4.0     R.methodsS3_1.8.1 rvest_1.0.2       AzureGraph_1.3.1  evaluate_0.14    
[25] knitr_1.36        tzdb_0.2.0        fastmap_1.1.0     curl_4.3.2        fansi_0.5.0       Rcpp_1.0.7        openssl_1.4.5     backports_1.4.0  
[33] checkmate_2.0.0   desc_1.4.0        pkgload_1.2.3     vroom_1.5.6       jsonlite_1.7.2    fs_1.5.0          mime_0.12         bit_4.0.4        
[41] hms_1.1.1         askpass_1.1       digest_0.6.28     stringi_1.7.4     rprojroot_2.0.2   fasttime_1.0-2    cli_3.1.0         tools_4.1.2      
[49] magrittr_2.0.1    AzureAuth_1.3.3   tibble_3.1.6      crayon_1.4.2      pkgconfig_2.0.3   ellipsis_0.3.2    xml2_1.3.2        rmarkdown_2.11   
[57] rstudioapi_0.13   R6_2.5.1          compiler_4.1.2 
juliasilge commented 1 year ago

Thanks for your patience with this! Can you create a reprex (a minimal reproducible example) for this? The goal of a reprex is to make it easier for us to recreate your problem so that we can understand it and/or fix it. If you've never heard of a reprex before, you may want to start with the tidyverse.org help page. Thanks! 🙌

library(pins)

container <- AzureStor::storage_container(
  "https://cipins2.blob.core.windows.net/morepins/", 
  key = Sys.getenv("PINS_AZURE_KEY")
)

board  <- board_azure(container)
pin_list(board)
#> [1] "cars"
pin_exists(board, "cars")
#> [1] TRUE

Created on 2022-11-04 with reprex v2.0.2

juliasilge commented 1 year ago

Let us know if you have further problems! 👍

github-actions[bot] commented 1 year ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.