Explanation and Solution for the "Cannot find an appropriate cached snapshot folder for the specified revision..." Error
When running the pyVideoTrans software and using the faster-whisper mode, you might frequently encounter the following seemingly complex error. Please don't worry.
This is usually not a software bug but a common network 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.
1. What Does This Error Actually Mean?
Simply put, this error is like a two-step chain reaction:
Step 1: Model download fails. The program needs to download the "faster-whisper" model from the internet to work. However, because your network cannot connect smoothly to the model server (Hugging Face), or the download was interrupted, the model download failed.
Step 2: Can't find the model after switching to offline mode. When the faster-whisper library detects a network download failure, it cleverly tries to find the model in your local computer folders (this is called "offline mode"). But since the download in the first step never succeeded, your computer is naturally empty, so it reports "Cannot find the model locally," leading to the error you see.
In one sentence: A poor network connection causes the model download to fail, and the failed download means there's no local model available.
2. How to Solve This Problem?
The core idea is to: Ensure the model can be completely downloaded to your computer. Here are two simple and effective solutions for you.
Solution 1: Optimize Your Network Environment and Let the Program Download Itself (Recommended)
The program has a built-in channel to download from a domestic mirror site, which is usually the fastest and most stable method.
Disconnect from your Proxy/VPN: If you are using any form of system proxy or VPN, please disable them first. VPNs can be unstable and may disconnect during the long download of a large model, causing failure.
Delete failed cache files:
- Find the program's main folder (the one where
sp.exe
is located). - Go into the
models
subfolder. - Find and delete the folder related to the model you were trying to download (e.g., something like
models--Systran--faster-whisper-largexxx
). This step is to clear out incomplete or corrupted downloaded files.
- Find the program's main folder (the one where
- Rerun the program: After disabling 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: Use a Dedicated Download Tool to Manually Download the Model
If Solution 1 doesn't work, or if your network environment is special, we have prepared a dedicated model download tool for you. You can download all the models at once (a total of 8 models for faster-whisper), just like downloading regular software, and then run the main program.
Download Tool:
- For users overseas or with a stable proxy:
- Click to download down_huggingface.exe
- (Note: This version downloads from the official Hugging Face website and requires a stable international internet connection or a properly configured system proxy.)
- For users overseas or with a stable proxy:
How to Use:
- Place the downloaded
.exe
file into the main program's folder (in the same directory assp.exe
). - Double-click the
.exe
file you downloaded. A command-line window will open and automatically start downloading all the necessary models. - The download process may take some time, especially for the large-sized
large
series models. Please be patient and wait until the window prompts that everything is complete.
- Place the downloaded
Important Notes:
- Models like
large-v1
,large-v2
, andlarge-v3
are very large (several GB). If your network is unstable, the download might fail midway.- If the download fails, don't worry. Simply double-click the same
.exe
file again. It supports resumable downloads and will continue from where it left off.
Once all models have been successfully downloaded to the models
folder using either of the methods above, run the main program again, and the problem should be solved