-
Notifications
You must be signed in to change notification settings - Fork 47
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
drive_mv in Shared Drive environment #377
Comments
I would need to see a code snippet that allows me to create the situation and reproduce this. I can't troubleshoot based on the above. |
Hi @jennybc, I updated with more code -- any thoughts? Thanks, |
Presenting same problem moving newly created test file into test folder in shared drive through drive_mv() |
I haven't delved into this deeply, but I will quickly share that I had a recent bulk file moving task involving a folder on a shared drive and there are definitely limits re: who can do such moves. I actually had to get our Google Workspace admin to elevate my privileges, watch me work on a Zoom call while sharing my screen, then I was de-privileged afterwards. So my hunch, given my experience and that there's two of you now, is that what you're trying to do may actually not be allowed. Versus being a flaw in the googledrive package. I could be wrong, but just wanted to mention this, so you can continue to troubleshoot or workaround, before I have time to engage more deeply with this issue. |
Thanks for the response. The error message isn't that it isn't allowed but
refers to dual "parentage" having been depreciated. I have sufficient
privilege, as I can move the files manually. So, I think there has been a
change in Google policy on these objects that has impacted the package
code.
…On Wed, Oct 20, 2021 at 9:06 AM Jennifer (Jenny) Bryan < ***@***.***> wrote:
I haven't delved into this deeply, but I will quickly share that I had a
recent bulk file moving task involving a folder on a shared drive and there
are definitely limits re: who can do such moves. I actually had to get our
Google Workspace admin to elevate my privileges, watch me work on a Zoom
call while sharing my screen, then I was de-privileged afterwards.
So my hunch, given my experience and that there's two of you now, is that
what you're trying to do may actually not be allowed. Versus being a flaw
in the googledrive package.
I could be wrong, but just wanted to mention this, so you can continue to
troubleshoot or workaround, before I have time to engage more deeply with
this issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#377 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACIY2CS76YW3MNYYDXKEZU3UH3LIPANCNFSM5FPSPV6Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Thank you for the quick reply, and sorry for responding so late. I am admin, but I checked to see if I have used the wrong account, and it was not the case. I got this: Client error: (403) Forbidden
|
Yeah I think I know what the problem is. I'm pretty sure it's a relatively easy fix. |
I've been able to replicate the problem and fix it with #379. I remember initially being pleasantly surprised that I could just add a parent folder, w/o removing the previous one. As we've all experienced, that did work at one point in time. But it no longer does and, frankly, the current behaviour was always sort of implied by the docs. So now I add and remove parent(s) in one atomic operation. I need to test this solution a bit more, before I merge it, but if anyone here wants to independently verify that this is basically the fix, feel free to install from that PR and report back. Here are some ways to install googledrive from that PR: install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
pak::pkg_install("tidyverse/googledrive#379")
# or
devtools::install_github("tidyverse/googledrive#379") |
I'll give it a shot tomorrow and let you know.
Thanks!
…On Thu, Oct 28, 2021 at 7:53 PM Jennifer (Jenny) Bryan < ***@***.***> wrote:
I've been able to replicate the problem and fix it with #379
<#379>. I remember initially
being pleasantly surprised that I could just add a parent folder, w/o
removing the previous one. As we've all experienced, that *did work* at
one point in time. But it no longer does and, frankly, the current
behaviour was always sort of implied by the docs. So now I add and remove
parent(s) in one atomic operation.
I need to test this solution a bit more, before I merge it, but if anyone
here wants to independently verify that this is basically the fix, feel
free to install from that PR and report back.
Here are some ways to install googledrive from that PR:
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")pak::pkg_install("tidyverse/googledrive#379")
# ordevtools::install_github("tidyverse/googledrive#379")
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#377 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACIY2CU75EFWFK2ZE43OGF3UJH47ZANCNFSM5FPSPV6Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
The solution has worked here. Thank you very much! |
More background, mostly for myself: the existing logic seems to work in a user's My Drive. But you do really have to remove parent +add parent if the file in question lives on a shared drive. This problem is currently only affecting people moving files around on a shared drive. |
Hi Jenny,
Sorry for coming back to this topic after so long. We're finally back in
need of this and still getting the same error in the loaded googledrive
package. Was the fix ever put into the production package?
I've been trying to load the "fix" package, but it hangs during the install
stage (has been installing for the past 20 minutes as I write this).
The scenario we have that would make it nice to actually move a file from
one folder to another is as follows:
- We are a large urban school district. I work in Central Office and
help in planning standardized testing.
- We deliver files with lists of students who are scheduled for
standardized tests to schools via a series of shared folders. We must
manage sharing on these folders because the information about the students
that we share should only be seen by administrators and teachers at THAT
school and not any of our other schools
- We use outside vendors to supply the tests themselves. We get files
from vendors on which students THEY think are scheduled for testing at a
particular school.
- Since families move, there are many instances when a student may
change schools. Or, a parent may decide they do not wish for their child to
participate in standardized testing. Anyway, there are many situations
where the lists of students at a given school may change.
- Due to that fact, we re-publish files on a weekly basis from early in
the semester until testing is completed.
- School level administrators have requested that we maintain prior
files for reference. The preferred method is to MOVE this file into an
"archive" folder. Without the move capability, we resort to renaming the
file. But this results in many files an administrator must scroll through
to get to the most recent student list file.
Thanks for the great package otherwise.
Thanks,
Bruce
…On Fri, Oct 29, 2021 at 4:41 PM Jennifer (Jenny) Bryan < ***@***.***> wrote:
More background, mostly for myself: the existing logic seems to work in a
user's My Drive. But you do really have to remove parent +add parent if the
file in question lives on a shared drive. This problem is currently only
affecting people moving files around on a shared drive.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#377 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACIY2CR2R2MMA33OYSNIRA3UJMPIPANCNFSM5FPSPV6Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Well, now I have a red face.
After sending this, I stopped the install process. I got an "RStudio is not
responding" message and allowed it to restart. I went back to the original
load process and now it is indeed moving files.
At least you got a broader context of the need. 😎
Thanks again.
On Mon, Mar 7, 2022 at 4:28 PM The Bruce, Mile High ***@***.***>
wrote:
… Hi Jenny,
Sorry for coming back to this topic after so long. We're finally back in
need of this and still getting the same error in the loaded googledrive
package. Was the fix ever put into the production package?
I've been trying to load the "fix" package, but it hangs during the
install stage (has been installing for the past 20 minutes as I write
this).
The scenario we have that would make it nice to actually move a file from
one folder to another is as follows:
- We are a large urban school district. I work in Central Office and
help in planning standardized testing.
- We deliver files with lists of students who are scheduled for
standardized tests to schools via a series of shared folders. We must
manage sharing on these folders because the information about the students
that we share should only be seen by administrators and teachers at THAT
school and not any of our other schools
- We use outside vendors to supply the tests themselves. We get files
from vendors on which students THEY think are scheduled for testing at a
particular school.
- Since families move, there are many instances when a student may
change schools. Or, a parent may decide they do not wish for their child to
participate in standardized testing. Anyway, there are many situations
where the lists of students at a given school may change.
- Due to that fact, we re-publish files on a weekly basis from early
in the semester until testing is completed.
- School level administrators have requested that we maintain prior
files for reference. The preferred method is to MOVE this file into an
"archive" folder. Without the move capability, we resort to renaming the
file. But this results in many files an administrator must scroll through
to get to the most recent student list file.
Thanks for the great package otherwise.
Thanks,
Bruce
On Fri, Oct 29, 2021 at 4:41 PM Jennifer (Jenny) Bryan <
***@***.***> wrote:
> More background, mostly for myself: the existing logic seems to work in a
> user's My Drive. But you do really have to remove parent +add parent if the
> file in question lives on a shared drive. This problem is currently only
> affecting people moving files around on a shared drive.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#377 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACIY2CR2R2MMA33OYSNIRA3UJMPIPANCNFSM5FPSPV6Q>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
>
|
Not sure if entirely related this bug, but I have the same error/issue and it still doesn't work, see my SO post: https://stackoverflow.com/questions/73750125/trying-to-move-a-google-drive-file-with-googledrive-package-results-in-403-error |
@deschen1 Apparently I haven't released googledrive since I made this fix. This appears to the be only (substantive) change made since the last release. So for now, you need to use the dev version. |
Ah ok, that probably explains it. Since we are here, do you have any idea/plan on next releases? I understand the desire to avoid the overhead of publishing a new release just for a supposedly minor bug fix, but since it's several people now making it so far to respond on the dev page of the package, I feel there's indeed an audience for an updated version. ;-) |
I have to release gargle soon for other reasons, so then it would make sense to release googledrive (which currently depends on dev gargle). I'll put this on my near-term todo list. |
I would like to move files to another folder when uploading a new version so people have a record of previous files to refer to. drive_mv() worked fine for this in April 2021. Now when I try the same code in the same environment (and I continue with the same rights on the folders), I get the following error:
Error: Client error: (403) Forbidden
A shared drive item must have exactly one parent.
Run
rlang::last_error()
to see where the error occurred.I've also tried this with the overwrite = TRUE parameter, but the same result.
EDIT: Here is sample code:
The text was updated successfully, but these errors were encountered: