ohdsi-studies / PioneerWatchfulWaiting

This study is part of the joint PIONEER - EHDEN - OHDSI studyathon in March 2021, and aims to advance understanding of clinical management and outcomes of watchful waiting in prostate cancer.
Apache License 2.0
7 stars 18 forks source link

Error when sending to the OHDSI server #9

Closed rfherrerac closed 3 years ago

rfherrerac commented 3 years ago

After running: library("OhdsiSharing") privateKeyFileName <- "~/Characterization/study-data-site-pioneer" userName <- "study-data-site-pioneer" fileName <- "/home/ronald/Characterization/CPRD/diagnostics/Results_diagnostics_CPRD.zip" folderName <- "CPRD" sftpUploadFile(privateKeyFileName, userName, folderName, fileName)

Got:

Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : java.io.FileNotFoundException: ~/CharacD5/CPRDD5/Results_CPRDD5.zip (No such file or directory)

And the file is actually there.

keesvanbochove commented 3 years ago

Hi @rfherrerac, the file not found exception mentions a different file and path than the fileName you assigned above it. Could you double check your variable assignments? The sftpUploadFile function just uploads one file to the remote folder, and it should be generating a log message "Uploading ..." - can you check the log as well?

keesvanbochove commented 3 years ago

Fixed by updating upload functions in Sharing.R.