rstudio / pins-r

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

pins and AzureStor: unused argument (azure_storage_progress_bar = progress) #624

Closed guzu92 closed 1 year ago

guzu92 commented 2 years ago

@hadley

pins 1.0.1 AzureStor 3.7.0

I'm getting this error

Error in withr::local_options(azure_storage_progress_bar = progress, .local_envir = env) : 
  unused argument (azure_storage_progress_bar = progress)
Calls: %>% ... pin_meta.pins_board_azure -> azure_download -> local_azure_progress
Execution halted

when running pin_read() in the following code (pin_list() works fine)

bl_endp_key <- storage_endpoint(endpoint = <endpoint URL>, key =<endpoint key>")
container <- storage_container(endpoint = bl_endp_key, name = <blob name>)
board <- board_azure(container = container, path = "accidentsdata")
cat("Testing pins:\n")
print(board %>% pin_list())
accidents2 <- board %>% pins::pin_read('accidents') %>% as_tibble()

My goal is to "pin_read" a dataset located on a Azure Blob Storage from an R script being run from pipelineJoB (YAML) including a command: Rscript script.R ... and an environment: based on a dockerfile installing R version 4.0.0 (2020-04-24) -- "Arbor Day"

The pipelineJob is being called from an Azure DevOps Pipeline task with az ml job create <pipelineJob YAML> <resource grp> <aml workspace name>.

Note: the R script runs fine on my Windows RStudio desktop, with R version 4.1.3 (2022-03-10) -- "One Push-Up".

I've already tried with

options(azure_storage_progress_bar=FALSE) or

withr::local_options(azure_storage_progress_bar=FALSE)

but I'm getting the same unused argument (azure_storage_progress_bar ... error.

FYI: local_azure_progress is defined here here

juliasilge commented 1 year ago

I believe this change ⤴️ will fix any problem about "unused argument" here. Please let us know if you run into this problem again!

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.