Open kdw2126 opened 2 years ago
Thank you it looks like your analysis is correct - do you have a likely fix I can start from?
If you delete the filename <- paste0(as.character(1:length(objectnames),"_",filename))
command and replace with filename <- objectnames
, the command worked as I expected. (You may not even need that line because several lines up the same operation is performed, but I haven't tested all the possible edge cases.
Whenever I run the bqr_download_extract command in 0.5.0, I get the following output:
Looking at the traceback and the log, the issue seems to be that the bqr_download_extract command is trying to download a file named "1" rather than a file with the appropriate name.
Looking through the code, this line seems to be the culprit:
In cases where there are multiple files (length of object names > 1), then this is assigning the filename to equal a list of numerical strings the length of objectnames. In the case of my machines, if there are three files that it is looking to download, 1:length(objectnames) produces a list [1, 2, 3] and as.character transforms this list to "1" "2" "3". This is why the error messages mentions failing to find file 1. When I replace the logic to set filename equal to objectnames instead of paste0(as.character(1:length(objectnames),"_",filename)), the code works as expected.
Let me know if you need more information to troubleshoot. I haven't used R in a while so I might have missed something obvious, although this error has occurred on multiple machines that members of my team have used.