When I was downloading the resnet18 network using torchvision.models.resnet18(), I manually terminated it once and when I ran it again, I got the error PytorchStreamReader failed reading zip archive: failed finding central directory
This is because after manually terminating the program, the file was halfway down, but when I rerun it, the program thought it was done and started unpacking, which resulted in an error. Here is the file I downloaded halfway:
The procedure to detect if the file already exists is in the torch.hub file at line 585, follow the error message to find the torch.hub file
Type a breakpoint here, debug it, then see what the value of cached_file is here, follow the path of cached_file to find the file that is halfway down, delete it and you’re done.
When I run it, the path of this file looks like this
Read More:
- torchvision.dataset Failed to Download CIFAR10 Error [How to Solve]
- [Solved] Triton-inference-server Start Error: Internal – failed to load all models
- [Solved] Azkaban uploads Zip file error: installation failed.malformed
- tar: Error opening archive: Failed to open ‘/Users/xxx/Library/Caches/Homebrew/downloads/348a16e
- [Solved] Brew Install ffmpeg Error: tar: Error opening archive: Failed to open
- flutter | W/zipro(12512): Error opening archive D:\…Invalid file ERROR: dump failed because…
- [Solved] failed (13: Permission denied) while reading upstream
- Aapt Remove Command error during crunch – archive is toast
- [Solved] Django Models Error: Manager isn‘t accessible via UserInfo instances
- [Solved] Oracle Delete the Archive Error: RMAN-08137
- Error when manipulating files: zipfile.BadZipFile: File is not a zip file
- [Solved] spark sql Error: Can‘t zip RDDs with unequal numbers of partitions
- NPM install error: Cannot find module ‘D:\zip\node_modules\npm\bin\npm-cli.js‘
- [Solved] Error reading comm device when writing serial communication with MSComm control
- [Solved] azkaban Upload zip Error :Error Chunking during uploading files to db
- [Solved] Installation failed due to: ‘INSTALL_FAILED_SHARED_USER_INCOMPATIBLE: Package com.
- docker load Error processing tar file(exit status 1): archive/tar: invalid tar header
- Win assembleDebug Downloading gradle.zip Error: Exception in thread “main” java.lang.RuntimeException: javax.net.ssl.SSLExce
- [Solved] INSTALL_FAILED_DEXOPT (DEX optimization verification failed)
- [Solved] Pip install icu failed: Command “python setup.py egg_info” failed with error code 1 in