-
-
Notifications
You must be signed in to change notification settings - Fork 350
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
Permission denied ... Maybe you need to change permission over 'Anyone with the link'? #43
Comments
The same error |
same error |
I have this issue as well with a 15GB dataset and a 4.3 GB dataset. But when I copy the 4.3GB to my local drive and manually get the link on my copied dataset it works. Can't make a copy of the 15GB on free drive though. For reference the datasets im downloading are: I was actually able to successfully download both datasets once from the original links but after needing to redo the downloads they no longer work even when uninstalling and reinstalling gdown |
@Rmao99 Thanks for the information. That behavior makes sense if that's the issue of Google-Drive's side. It seems they restrict access from the command-line for data with many access (e.g., public dataset). |
I've added a new feature to keep cookies #51. You can try pre-released version of this.
by default, cookies is enabled and saved into |
I have the same issue. I tried the above version, not fix. |
I met the same error when I try to download many big files from my google drive, have anyone fixed it? |
I find if I Thanks for gdown. Very helpful! |
@carlmalamud Thanks for info. Do you have any sharable links to reproduce this? |
Unfortunately, there is nothing in ~/.cache/gdown/
…On Wed, Jun 3, 2020 at 10:23 PM Carl Malamud ***@***.***> wrote:
I find if I rm ~/.cache/gdown/cookies.json and then restart my script,
things start downloading again. Is your cookie expiring perhaps? I'm good
for 1,000 or so files before I get the error.
Thanks for gdown. Very helpful!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#43 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJDECDYFMKEGB3BS3FBLVETRUZMGZANCNFSM4LTI65IQ>
.
--
*Xiya Li*
*State Key Laboratory of Information Engineering in Surveying, Mapping and
Remote Sensing, Wuhan University, Wuhan, China*
*(M**aster**)*
|
@wkentaro What is happening is your cookie keeps growing and growing until it is full. I believe every time there is a warning, a new line gets added. I've seen my cookie grow from 11 warnings to 36 warnings in about 2 hours. After about 1,000 files, there are presumably enough that there isn't room for more warnings, so you when present the cookie that doesn't mention a particular download, Google rejects it and your code is thinking that it is a permission issue. Perhaps if your cookie fails, you could remove it, try again, and only then if it fails a second time assume it is a permissions issue. Here is a snippet of what my cookie looks like: [ |
It looks like the magic number is 110 download_warnings and the cookie is full. |
@carlmalamud thanks! |
Sent a PR here: #55 |
Released as v3.11.1 |
@carlmalamud can you try if the new version eases the issue? |
Same problem, upgraded to latest release and I get the following message:
|
I was chugging along nicely for a while, but I now am also getting same error as @grudloff. I was in fact able to pull the file up in a browser and start the download as indicated above. I looked in the gdown cookie and didn't see any download_warning lines, so evidently we never got the cookie back from them with the additional authorization. (I have now installed 3.11.1, but was running on 3.11.0 before, I simply inserted a "rm ~/.cache/gdown/cookies.json" every fifty lines. Sorry, it was working so I didn't want to bother it. :). The upgrade doesn't seem to help on the above error. |
I am imagining that the error might have something to do with my being an authenticated user in the browser and not via gdown. I'm not sure is presenting an oauth token might make a difference here? |
I don't think so, gdown uses |
Solved by disabling certificate verification by changing line 111 in download.py
However it does display this warning |
In my case, it didn't work. |
@e96031413 worked like a charm. thanks alot |
actually solved my issue. thanks |
This PR #300 should help this issue in some regard. I also added FAQ to the README. Releasing v5.0.0 soon. |
When hitting large files that GDrive wants extra confirmation before it starts the download, e.g. https://drive.google.com/uc?id=1r6o0pSROcV1_VwT4oSjA2FBUSCWGuxLK, we currently hit this branch: Lines 31 to 35 in ae122f4
The relevant corresponding HTML looks like <form id="download-form" action="https://drive.usercontent.google.com/download" method="get">
<input type="submit" id="uc-download-link" class="goog-inline-block jfk-button jfk-button-action" value="Download anyway"/>
<input type="hidden" name="id" value="1r6o0pSROcV1_VwT4oSjA2FBUSCWGuxLK">
<input type="hidden" name="confirm" value="t">
<input type="hidden" name="uuid" value="ce320bab-e9f0-4d0d-a9d8-8cede0161915">
</form> The branch above just extracts What we should do here is to extract the other parts of the form as well and append them as query. So for this example |
Hi everyone. I've just merged #308 by @pmeier, which adds extra pattern to parse the url to download. Since I've never seen that pattern, I suspect it is a regional issue (I'm accessing from Japan, @pmeier is accessing from Germany). But at least It should help people who have the same issue as him. |
@wkentaro Hi, I observed that only downgrading to |
Can you please give me an example url? |
I tried both
and
But it only works for me with |
@vanloc1808 It seems working for me with the latest. Maybe the cookies file is not helping? If so remove it by |
@wkentaro it works for me, thank you! |
Restarting the terminal after the downgrading works for me! |
I had a funny moment today. I got the same issue explained in the first message on the topic. The solution was to reinstall a several times version of gdown and finally install 5.1.0 ver to solve the problem. But this version had this issue when I started searching for the solution 😆 p.s. it is for colab |
Yeah this happened to me as well several times (with different versions). I'm not sure why, but changing the version (sometimes to a newer one, sometimes to an older one) seem to work, but always with a different version. Maybe it clears something and allows gdown to download again? I usually try versions 4.6.0, 5.1.0, or the latest (pip install --upgrade gdown). I also remove cookies.txt, and I end up (randomly) with a version that works. Hope this helps |
Weirdly this worked for me too. And I was using the default gdown ( |
@wkentaro I'm still suffering this issue today. (gdown version 5.2.0) I'm trying to download my own uploaded dataset (10G) And it raises the error
@JiaHeng-DLUT 's workaround works for me (https://stackoverflow.com/questions/65312867/how-to-download-large-file-from-google-drive-from-terminal-gdown-doesnt-work) |
@ain-soph It works for me now, so looks like too many requests?
We can't do this because the scope of gdown is without logging in. this is another workaround: https://github.com/wkentaro/gdown?tab=readme-ov-file#i-set-the-permission-anyone-with-link-but-i-still-cant-download |
To anybody reading this
This will save all the files that were mentioned in the file_urls.txt , just make there is only one url per line. |
@cleanerspam does the script works with gdrive folders? |
Try and tell , as far as I remember it was for individual links stored in a .txt file |
@cleanerspam I tried it out, but unfortunately it didn’t work. The script also didn’t work for some reason, as it only stores the files with no actual data inside. Still, a massive thank you for your efforts! |
I want to download a 16GB zip file on Google Drive using:
gdown https://drive.google.com/uc?id=1InfIal4y7OBMGNUDeldEmDxtD0MrewY8
I have already set the permissions on the file to ``Anyone with the link''
But I get this error:
Permission denied: https://drive.google.com/uc?id=1InfIal4y7OBMGNUDeldEmDxtD0MrewY8
Maybe you need to change permission over 'Anyone with the link'?
The text was updated successfully, but these errors were encountered: