-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with drive_get() #281
Comments
I'm also getting the same error, albeit very intermittently and randomly despite running the same code every time:
The |
I'm getting the same error, but there's some more info that's perhaps helpful. So when I run: When I search for "Herbivory_Individual" in my Drive, only the Google Sheet (that I'm trying to access) is returned. However, in R, when I search: Any idea what's up, and what all these items could be? |
The solution I found was to delete a file that originally began as a duplicate of the drive document I wanted that had a nearly identical name. Once I did that, drive_get() worked with no problem. Here is the SO answer that inspired me. Searches with drive_find() take too long as you discovered ( I quit after a couple of thousand documents) and I don't use them. |
Some background on what
https://googledrive.tidyverse.org/reference/drive_find.html#search-parameters https://googledrive.tidyverse.org/articles/articles/file-identification.html |
@bshor unfortunately that solution isn't working for me...so
So it works, but it definitely would be nice to be able to refer to the spreadsheets by name instead of URL. |
Deleting the file with a similar name is not an option for me either - one file is a spreadsheet with original data and the other is a companion document containing metadata. They have similar names so that we can easily tell which files go together. And we have a lot of these files. The drive_get() error started for me when I updated the googledrive package to v 1.0.0. As @jennybc suggested, using the q = function in drive_find() greatly speeds along the search process so I used that to work around the drive_get() issue.
From here I can go ahead with drive_download() and just skip using drive_get(). There are more ways to search for other file characteristics using q listed here: https://developers.google.com/drive/api/v3/search-files |
I still have yet to experience this phenomenon or get enough data to truly study it. But I have formed an untestable hypothesis about the root cause and installed a fix 🤞 Needless to say, please open a new issue if you update to this dev version and still see the phenomenon. |
I thought I'd fixed it as I described above, but I got the anyDuplicated error again (this is on googledrive 1.0.0). I tried drive_find with a q and a pattern option, and it was much faster and worked without error. |
In the development version of googledrive, there is a fix for the anyDuplicated error (e56b3f5). But I now believe there is a general problem, from the Google side, re: exhaustively listing files (#288). One conclusion from all of these investigations is that when accuracy and performance become very important, you should maximize your use of the |
I was using googledrive before the upgrade to version 1.0 successfully to access and download google sheets as Excel files. But now with version 1.0 (I'm running R 3.6.1 on Windows), I'm getting a difficult to understand error.
And I get this error:
Any ideas of what could be going on?
The text was updated successfully, but these errors were encountered: