Understanding and Fixing the "Cannot find an appropriate cached snapshot folder...
" Error
If you're using the pyVideoTrans software with the faster-whisper mode, you might encounter the seemingly complex error message below. Don't worry!
This is usually not a bug in the software itself, but a common network-related issue.
Traceback (most recent call last):
File "videotrans\task\_only_one.py", line 43, in run
File "videotrans\task\trans_create.py", line 371, in recogn
File "videotrans\recognition\__init__.py", line 236, in run
File "videotrans\recognition\_base.py", line 75, in run
File "videotrans\recognition\_overall.py", line 155, in _exec
RuntimeError: err[msg]=Cannot find an appropriate cached snapshot folder for the specified revision on the local disk and outgoing traffic has been disabled. To enable repo look-ups and downloads online, pass 'local_files_only=False' as input.
I. What Does This Error Actually Mean?
In simple terms, this error is a two-step chain reaction:
Step 1: Model Download Failed. The program needs to download the "faster-whisper" model from the internet to function. However, due to network connectivity issues with the model server (Hugging Face), or interruptions during the download, the model wasn't downloaded successfully.
Step 2: Model Not Found in Offline Mode. When the faster-whisper library detects a failed network download, it automatically tries to find the model in your local computer folders (this is called "offline mode"). Since the initial download failed, your computer doesn't have the model, leading to the "model not found locally" error.
In short: Poor network connection leads to failed model download, and the failed download results in no local model available.
II. How to Fix This Problem?
The main idea is to ensure the model is completely downloaded to your computer. Here are two simple and effective solutions.
Solution 1: Optimize Network Environment for Automatic Download (Recommended)
The program is configured to download from a domestic mirror site, which is usually the fastest and most stable way.
Disconnect Proxy/VPN: If you are using any system proxy or VPN, please turn them off first. VPNs can be unstable and may disconnect during the lengthy large model download.
Delete Failed Cache Files:
- Find the main program folder (where
sp.exe
is located). - Go to the
models
folder inside. - Find and delete the folder related to the model you were trying to download (like
models--Systran--faster-whisper-largexxx
). This clears incomplete or corrupted download files.
- Find the main program folder (where
- Restart the Program: After turning off the proxy and clearing the cache, restart the main program. It should now be able to download the model smoothly from the domestic mirror server.
Solution 2: Manually Download the Model Using a Dedicated Downloader
If Solution 1 doesn't work, or your network environment is special, we have a dedicated model downloader ready for you. You can download all the models at once (8 models for faster-whisper) like downloading regular software, and then run the main program.
Download Tools:
For Users in China (Recommended):
- Click to Download down_hf-mirror.exe
- (Note: This version downloads from a domestic mirror site, which is faster and usually doesn't require additional network settings.)
For Users Overseas or with Stable Proxy:
- Click to Download down_huggingface.exe
- (Note: This version downloads from the Hugging Face official website, which requires stable access to the international internet, or a properly configured system proxy.)
How to Use:
- Place the downloaded
.exe
file in the same folder as the main program (wheresp.exe
is located). - Double-click the downloaded
.exe
file. This will open a command-line window and automatically start downloading all the required models. - The download process may take some time, especially for the
large
series models which are quite large (several GB), please wait patiently until the window indicates that everything is complete.
- Place the downloaded
Important Notes:
large-v1
,large-v2
,large-v3
and other models are very large (several GB). If your network is unstable, the download may fail midway.- If the download fails, don't worry, double-click the same
.exe
file again. It supports resuming interrupted downloads and will continue from where it left off.
Once all the models are successfully downloaded to the models
folder using either of the above methods, running the main program again should solve the problem!