Closed thibaulttabarin closed 2 years ago
Solved! after restarting my terminal. It worked! I have no idea why. If someone knows?
having the same question, but still stuck. it might be google's problem
Stopped working for large files (197.4MB) about a day ago. Looks like google made some breaking changes recently.
Update: Strange behavior: after restarting the session (Colab notebook) the first big file is downloaded successfully, the second download (same or another big file) fails with the error. Small files are not affected.
FYI: it probably the same problem as https://github.com/wkentaro/gdown/issues/43
so strange, same code pass on gh-action but failed on my own machine.
try add option --no-cookies
, that works for me.
Google Drive link (Get link → Anyone with the link): https://drive.google.com/file/d/1AHn99gSXRWjPHixmni1Z5fAQ9Jf3xjrt/view?usp=sharing
> gdown --id 1AHn99gSXRWjPHixmni1Z5fAQ9Jf3xjrt
Access denied with the following error:
Cannot retrieve the public link of the file. You may need to change
the permission to 'Anyone with the link', or have had many accesses.
You may still be able to access the file from the browser:
https://drive.google.com/uc?id=1AHn99gSXRWjPHixmni1Z5fAQ9Jf3xjrt
--no-cookies
.When the "Download anyway" button is pressed, a direct link is generated:
This link works only in the same browser.
Same issue here.
The page that is displayed (see comment two up for an example) contains a link in the source that can be used to download the item without being forced to click the button. The link has a query parameter of confirm=t
. I'm able to download a file using curl like so:
curl -L -s -o data/my-file.h5 'https://drive.google.com/uc?id=my-file-id-here&confirm=t
@robmoore This works for me if I modify it slightly
curl -L -o 'FILENAME.h5' 'https://drive.google.com/u/0/uc?id=MY_ID_HERE&export=download&confirm=t'
(I also removed the -s to ensure it is downloading the correct file)
In the last week, I started having this problem with a file that I hadn't previously had any trouble with. This is the fix I found:
gdown.download(
f"https://drive.google.com/uc?export=download&confirm=pbef&id={file_id}",
output
)
In the last week, I started having this problem with a file that I hadn't previously had any trouble with. This is the fix I found:
gdown.download( f"https://drive.google.com/uc?export=download&confirm=pbef&id={file_id}", output )
This solution worked for me. Huge thanks
@VKarpick It also worked in my environment! Thank you so much for finding the solution!! https://github.com/wkentaro/gdown/pull/147 will include your solution. Hope this fixes all the problems related to Permission Error after many accesses.
Gdown v4.3.0 is out! https://github.com/wkentaro/gdown/releases/tag/v4.3.0 Hope it fixes this issue. (Please request reopening if not)
FYI, you can upgrade gdown by:
pip install --upgrade --no-cache-dir gdown
In the last week, I started having this problem with a file that I hadn't previously had any trouble with. This is the fix I found:
gdown.download( f"https://drive.google.com/uc?export=download&confirm=pbef&id={file_id}", output )
The new version still produced the same error, but this comment solve it. Thanks :pray:
@abdelmalek13 Can you possibly share the file id (privately via email)? I need to know why is that.
@wkentaro Does it have something to do with open
vs uc
links? The first snippet below works (using the open link) and the second doesn't (using the uc link):
# Works:
>>> for i in range(10):
... gdown.download('https://drive.google.com/open?id=1EC5XAM-maBPsbMTfvpBs_NFo3UC_qFMy', 'temp.pdf', use_cookies = False, quiet = True)
...
'temp.pdf'
'temp.pdf'
'temp.pdf'
'temp.pdf'
'temp.pdf'
'temp.pdf'
'temp.pdf'
'temp.pdf'
'temp.pdf'
'temp.pdf'
# Fails
>>> for i in range(10):
... gdown.download('https://drive.google.com/uc?id=1EC5XAM-maBPsbMTfvpBs_NFo3UC_qFMy', 'temp.pdf', use_cookies = False, quiet = True)
...
Access denied with the following error:
Cannot retrieve the public link of the file. You may need to change
the permission to 'Anyone with the link', or have had many accesses.
You may still be able to access the file from the browser:
https://drive.google.com/uc?id=1EC5XAM-maBPsbMTfvpBs_NFo3UC_qFMy
@abdelmalek13 Can you possibly share the file id (privately via email)? I need to know why is that.
I'm too sorry :pray: @wkentaro it's a sensitive document that belonged to a customer I can't share this file with you, I'll try to reproduce the error with another dummy file
Solved! after restarting my terminal. It worked! I have no idea why. If someone knows?
Thanks a lot
Solved by upgrading python version 2.7 to latest along with pip3 version
In google colab try this, it solved my issue
!pip install --upgrade --no-cache-dir gdown
Gdown v4.3.0 is out! https://github.com/wkentaro/gdown/releases/tag/v4.3.0 Hope it fixes this issue. (Please request reopening if not)
FYI, you can upgrade gdown by:
pip install --upgrade --no-cache-dir gdown
thanks, mine works after updating. Hope it doesn't crash again
In the last week, I started having this problem with a file that I hadn't previously had any trouble with. This is the fix I found:
gdown.download( f"https://drive.google.com/uc?export=download&confirm=pbef&id={file_id}", output )
Huge Thanks ! Saviour
Hello! I understand if this is a beginners question, but nonetheles: I get the above error msg:
"Access denied with the following error:
Cannot retrieve the public link of the file. You may need to change
the permission to 'Anyone with the link', or have had many accesses.
You may still be able to access the file from the browser:"
And I have tried reading through the fixes for this problem. However, Im not sure how to try them since I just use GitHub through the web browser to do RVC (change audio files through pre-trained voice models). All I do is run a session with the small play-button and I dont know how to solve the problem that I can no longer add new AI-voice models.
Is this problem solvable without using external software (many are refering to updating python and gdown) Thanks for your help! :)
I have 355 MB file on google drive I have download before with gdown and it worked (around Nov 2021) Today 14 Feb 2022, when I tried again it didn't worked.
I use : gdown --id
Error:
Access denied with the following error:
You may still be able to access the file from the browser:
I am the owner of the file on Google drive, I checked again for the status of the link (set to "Anyonae with the link")
I have asked a colleague to download the file and it worked for him using the same command : gdown --id
I uninstall and reinstall gdown
Still doesn't work
Any idea?