Sage-Bionetworks / synapser

An R package providing programmatic access to Synapse
Apache License 2.0
32 stars 21 forks source link

Cloud Drive Mapper Causing Error with Synapser #312

Closed jalavery closed 1 year ago

jalavery commented 1 year ago

Operating system

Which operating system are you working on? E.g., Ubuntu Linux, Max OSX, Windows 10, etc.

Windows 10 Enterprise, Version 20H2

Description of the problem

Provide a description of the problem, and if possible a minimal reproducible example.

Our team has previously used the below code to pull data from Synapse into R. However, our institution recently installed OneDrive and a OneDrive Cloud Mapper to map OneDrive files to a network path and it appears that the program iam cloud Cloud Drive Mapper (Version 2.9.5.2) interferes with the synapser package. When we sign out of the Cloud Drive Mapper, this error is resolved. We would prefer to be logged into the cloud drive mapper and be able to use synapser simultaneously, if possible.

library(synapser)

# source in login info since credentials won't save with OneDrive cloud mapper
source("synapse_pw.R")

synLogin("my_email", synapse_pw)

# load derived data files corresponding to GENIE BPC NSCLC public release
derived_data_file_synapse <- synGet("syn22299362", version = 44)
load(derived_data_file_synapse$path)

Expected behavior

What did you expect to happen?

I expected the code to pull the file corresponding to syn22299362 from Synapse into R.

Actual behavior

What actually happened? Provide output or error messages from the console, if applicable.

Error in value[3L] : [WinError 87] The parameter is incorrect

Output of sessionInfo()

Copy the output of running sessionInfo() to get a listing of your R environment. R version 4.2.2 (2022-10-31 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19042)

Matrix products: default

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

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

other attached packages: [1] synapser_0.15.35

loaded via a namespace (and not attached): [1] Rcpp_1.0.9 PythonEmbedInR_0.12.79 plyr_1.8.8 pillar_1.8.1 compiler_4.2.2
[6] tools_4.2.2 digest_0.6.30 lubridate_1.9.0 lifecycle_1.0.3 tibble_3.1.8
[11] gtable_0.3.1 timechange_0.1.1 pkgconfig_2.0.3 rlang_1.0.6 DBI_1.1.3
[16] cli_3.5.0 rstudioapi_0.14 fastmap_1.1.0 httr_1.4.4 cbioportalR_1.0.1.9000 [21] dplyr_1.0.10 stringr_1.5.0 janitor_2.1.0 generics_0.1.3 vctrs_0.5.1
[26] mskRvis_0.3.2 rprojroot_2.0.3 grid_4.2.2 tidyselect_1.2.0 glue_1.6.2
[31] snakecase_0.11.0 here_1.0.1 R6_2.5.1 fansi_1.0.3 arsenal_3.6.3
[36] purrr_1.0.0 ggplot2_3.4.0 magrittr_2.0.3 codetools_0.2-18 scales_1.2.1
[41] htmltools_0.5.3 assertthat_0.2.1 gt_0.8.0 colorspace_2.0-3 utf8_1.2.2
[46] stringi_1.7.8 pack_0.1-1 munsell_0.5.0

jalavery commented 1 year ago

In exploring this more, the problem seems to be that the .synapseCache file is on OneDrive. Is there a way to specify where the cache is stored? I appreciate any input on this that you may have, thank you!

thomasyu888 commented 1 year ago

Hi @jalavery ,

So, there is a ~/.synapseConfig file where you can configure you client. In that file, you can set something like this:

## your downloaded files are cached to avoid repeat downloads of the same file. change 'location' to use a different folder on your computer as the cache location
[cache]
location = ~/.synapseMyCache
jalavery commented 1 year ago

Thanks so much @thomasyu888! I was able to find the synapseConfig file and the location parameter. However, after I delete the original synapse cache and change the location in the configuration, it re-appears in its original location and I still get the error that the parameter is incorrect. I've tried including the location in quotes and without quotes and have tried a few different paths. Would you have a few minutes next week to meet with me and Sammi to troubleshoot? If not, happy to go back and forth here. We appreciate your help trying to resolve this. Thank you!

thomasyu888 commented 1 year ago

Thanks @jalavery, will correspond with you via email and perhaps set up a meeting to discuss this. Sorry for the immense delays in response.

thomasyu888 commented 1 year ago

Closing this issue for now as I unfortunately cannot get my hands on a cloud driver mapper, but the issue has been initially resolved by removing the mapper.