BadZipfile
See original GitHub issuepython 2.7 torchtext 0.2.1
trying to build the vocab:
my_text.build_vocab(train, vectors=GloVe(name='840B', dim=300))
results in error:
File "/home/noa/miniconda2/lib/python2.7/site-packages/torchtext/vocab.py", line 330, in __init__
super(GloVe, self).__init__(name, url=url, **kwargs)
File "/home/noa/miniconda2/lib/python2.7/site-packages/torchtext/vocab.py", line 223, in __init__
self.cache(name, cache, url=url)
File "/home/noa/miniconda2/lib/python2.7/site-packages/torchtext/vocab.py", line 251, in cache
with zipfile.ZipFile(dest, "r") as zf:
File "/home/noa/miniconda2/lib/python2.7/zipfile.py", line 770, in __init__
self._RealGetContents()
File "/home/noa/miniconda2/lib/python2.7/zipfile.py", line 813, in _RealGetContents
raise BadZipfile, "File is not a zip file"
zipfile.BadZipfile: File is not a zip file
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Python cant handle exceptions from zipfile.BadZipFile
In the code example underneath Im trying to catch the exception, so I can pass it. But my script is failing when the...
Read more >Python Examples of zipfile.BadZipfile - ProgramCreek.com
The following are 30 code examples of zipfile.BadZipfile(). You can vote up the ones you like or vote down the ones you don't...
Read more >zipfile — Work with ZIP archives — Python 3.11.1 documentation
The ZIP file format is a common archive and compression standard. This module provides tools to create, read, write, append, and list a...
Read more >python 3.9 and opepyxl : Error "zipfile ... - Google Groups
Hi current configuration: python: 3.9 |openpyxl: 3.0.6 | pandas: 1.2.3 |xlrd 2.0.1. Running the function below I get the error "zipfile.BadZipFile: File is ......
Read more >BadZipfile "file is not a zip file"
BadZipfile : File is not a zip file. When I look at data.zip in Windows, it appears to be a valid zip file....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found the glove.6B.zip file in about two seconds by entering
into my Terminal
Looks related to https://github.com/pytorch/text/issues/158. The easiest fix is to delete the GloVe zipfile and try again, it may be cached in
/home/noa/miniconda2/lib/python2.7/site-packages/torchtext/.data/