Skip to content

FileURLRetrievalError #5

@k-mcconvey

Description

@k-mcconvey

FileURLRetrievalError Traceback (most recent call last)
File c:\Users\AppData\Local\Programs\Python\Python313\Lib\site-packages\gdown\download.py:313, in download(url, output, quiet, proxy, speed, use_cookies, verify, id, resume, format, user_agent, log_messages, progress, skip_download)
312 try:
--> 313 url = get_url_from_gdrive_confirmation(res.text)
314 except FileURLRetrievalError as e:

File c:\Users\AppData\Local\Programs\Python\Python313\Lib\site-packages\gdown\download.py:68, in get_url_from_gdrive_confirmation(contents)
67 error = m.groups()[0]
---> 68 raise FileURLRetrievalError(error)
69 if not url:

FileURLRetrievalError: Too many users have viewed or downloaded this file recently. Please try accessing the file again later. If the file you are trying to access is particularly large or is shared with many people, it may take up to 24 hours to be able to view or download the file. If you still can't access a file after 24 hours, contact your domain administrator.

During handling of the above exception, another exception occurred:

FileURLRetrievalError Traceback (most recent call last)
Cell In[10], line 5
1 from detectzoo.benchmarks import BenchmarkEvaluator
3 DETECTORS = ["univfd","cnnspot","patchcraft","npr_deepfake","aide", "c2p_clip"]
----> 5 detector_objs = [load_detector(name, device=DEVICE) for name in DETECTORS]
7 out_dir = CORPUS / "detectzoo_results"
8 out_dir.mkdir(exist_ok=True)

File c:\Users\AppData\Local\Programs\Python\Python313\Lib\site-packages\detectzoo\core\registry.py:60, in load_detector(name, **kwargs)
58 available = ", ".join(sorted(set(_REGISTRY) | set(_ALIASES))) or "(none)"
59 raise ValueError(f"Unknown detector '{name}'. Available detectors: {available}")
---> 60 return _REGISTRYresolved

File c:\Users\AppData\Local\Programs\Python\Python313\Lib\site-packages\detectzoo\detectors\image\aide.py:337, in AIDEDetector.init(self, checkpoint_path, threshold, device, cache_dir, **kwargs)
334 import gdown
336 cache.mkdir(parents=True, exist_ok=True)
--> 337 gdown.download_folder(
338 id=_GDRIVE_FOLDER,
339 output=str(cache),
340 quiet=False,
341 use_cookies=False,
342 )
344 self._model = _AIDEModel()
345 raw = torch.load(self._ckpt, map_location="cpu", weights_only=False)

File c:\Users\AppData\Local\Programs\Python\Python313\Lib\site-packages\gdown\download_folder.py:185, in download_folder(url, id, output, quiet, proxy, speed, use_cookies, verify, user_agent, skip_download, resume)
183 else:
184 download_output = osp.dirname(local_path) + osp.sep
--> 185 local_path = download(
186 url="https://drive.google.com/uc?id=" + id,
187 output=download_output,
188 quiet=quiet,
189 proxy=proxy,
190 speed=speed,
191 use_cookies=use_cookies,
192 verify=verify,
193 resume=resume,
194 )
195 files.append(local_path)
196 if not quiet:

File c:\Users\AppData\Local\Programs\Python\Python313\Lib\site-packages\gdown\download.py:324, in download(url, output, quiet, proxy, speed, use_cookies, verify, id, resume, format, user_agent, log_messages, progress, skip_download)
314 except FileURLRetrievalError as e:
315 message = (
316 "Failed to retrieve file url:\n\n{}\n\n"
317 "You may still be able to access the file from the browser:"
(...) 322 url_origin,
323 )
--> 324 raise FileURLRetrievalError(message)
326 filename_from_url = None
327 last_modified_time = None

FileURLRetrievalError: Failed to retrieve file url:

Too many users have viewed or downloaded this file recently. Please
try accessing the file again later. If the file you are trying to
access is particularly large or is shared with many people, it may
take up to 24 hours to be able to view or download the file. If you
still can't access a file after 24 hours, contact your domain
administrator.

You may still be able to access the file from the browser:

https://drive.google.com/uc?id=1JYD1QO62wHwrvh2MVWS1GPjV314WsHcx

but Gdown can't. Please check connections and permissions.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions