You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever I run the bqr_download_extract command in 0.5.0, I get the following output:
> bqr_download_extract(bqr_get_job(jobId=job_extract,projectId=projectId))
Multiple files to download.
ℹ 2022-05-24 14:09:18 > Request Status Code: 404
Error in `abort_http()`:
! http_404 Unspecified error
Run `rlang::last_error()` to see where the error occurred.
✖ Downloading 1 ... failed
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.
The text was updated successfully, but these errors were encountered:
kdw2126
changed the title
Command bqr_download_extract fails in 0.5.0 when downloading from extract job producing multiple files
Command bqr_download_extract fails in 0.5.0 when downloading from extract job that produced multiple files
May 24, 2022
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.
The text was updated successfully, but these errors were encountered: