question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Internal error: confirm_token was not found in Google drive link.

See original GitHub issue
import os
import torch
from torchtext.data.utils import get_tokenizer
from torchtext.vocab import build_vocab_from_iterator
from torchtext.datasets import IWSLT2017
train_iter = IWSLT2017(split='train', language_pair=('en', 'de'))

Traceback (most recent call last): File “/Users/darcy/opt/anaconda3/envs/supar/lib/python3.7/site-packages/torchtext/data/datasets_utils.py”, line 257, in wrapper return func(root=new_root, *args, **kwargs) File “/Users/darcy/opt/anaconda3/envs/supar/lib/python3.7/site-packages/torchtext/data/datasets_utils.py”, line 219, in new_fn result.append(fn(root, item, **kwargs)) File “/Users/darcy/opt/anaconda3/envs/supar/lib/python3.7/site-packages/torchtext/datasets/iwslt2017.py”, line 194, in IWSLT2017 dataset_tar = download_from_url(SUPPORTED_DATASETS[‘URL’], root=root, hash_value=SUPPORTED_DATASETS[‘MD5’], path=os.path.join(root, SUPPORTED_DATASETS[‘_PATH’]), hash_type=‘md5’) File “/Users/darcy/opt/anaconda3/envs/supar/lib/python3.7/site-packages/torchtext/utils.py”, line 116, in download_from_url _DATASET_DOWNLOAD_MANAGER.get_local_path(url, destination=path) File “/Users/darcy/opt/anaconda3/envs/supar/lib/python3.7/site-packages/torchtext/_download_hooks.py”, line 50, in get_local_path response, filename = _get_response_from_google_drive(url) File “/Users/darcy/opt/anaconda3/envs/supar/lib/python3.7/site-packages/torchtext/_download_hooks.py”, line 29, in _get_response_from_google_drive raise RuntimeError(“Internal error: confirm_token was not found in Google drive link.”) RuntimeError: Internal error: confirm_token was not found in Google drive link.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
NivekTcommented, Mar 17, 2022

@NivekT @ejguan I think these errors are all coming from the GDriveReader in torchdata. Do you think this issue may be related to pytorch/data#204 and/or pytorch/data#167?

I don’t think it is related. The error is raised by the following line of code in torchtext: https://github.com/pytorch/text/blob/142b1ef32d04a46a46de92853d7a45d512be5e09/torchtext/_download_hooks.py#L36

I suspect users may have an older version of torchtext where the functions in _download_hooks.py are still being used instead of torchdata.

Note that in torchdata, confirm_token is optional and doesn’t raise an exception:

https://github.com/pytorch/data/blob/fbf097d43c9643fb9ca9ddcb7e2891630aac84ac/torchdata/datapipes/iter/load/online.py#L76-L78

0reactions
Nayef211commented, Apr 4, 2022

Closing because updating to torchtext version 0.12.0 resolves the error

Read more comments on GitHub >

github_iconTop Results From Across the Web

utils.download_from_url from torchtext 0.10.0 has a problem.
It seems the link doesn't offer confirm_token and it currently only support downloading from google drive links that have confirm_token.
Read more >
Resolve errors | Google Drive
To fix this error, refresh the access token using the long-lived refresh token. If this fails, direct the user through the OAuth flow,...
Read more >
Fix common issues in Google Drive
If you're having trouble viewing a file in Google Drive, here's how you can try to fix the issue. 1. Wait and try...
Read more >
Source code for torchtext.utils - PyTorch
format( url )) else: raise RuntimeError("Internal error: confirm_token was not found in Google drive link.") if confirm_token: url = url + "&confirm=" + ......
Read more >
I'm trying to get the direct download link for a file using the ...
When your access token cannot be used for retrieving the file metadata, an error ... This method is "One Time Download for Google...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found