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 bug in the software 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.
I. 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 function. However, the model fails to download successfully because your network cannot connect smoothly to the model server (Hugging Face), or the connection drops mid-download.
Step 2: Fails to find the model after switching to offline mode. When the faster-whisper library detects a network download failure, it smartly 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," which ultimately leads to the error you see.
In a nutshell: A poor network connection causes the model download to fail, and the failed download means no model is available locally.
II. How to Solve This Problem?
The core idea is: Ensure the model can be downloaded completely 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 in China, which is usually the fastest and most stable method.
Disconnect from Proxy/VPN: If you are using any form of system proxy or VPN, please disable them first. A VPN connection can be unstable and may disconnect during the long download of a large model, causing it to fail.
Delete Failed Cache Files:
- Navigate to the program's main folder (the one where
sp.exe
is located). - Go into the
models
folder inside it. - 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.
- Navigate to 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 mirror server.
Solution 2: Use a Dedicated Download Tool to Manually Download the Models
If Solution 1 doesn't work, or if you have a special network environment, 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 the Tool:
For users in China (Recommended):
- Click to download down_hf-mirror.exe
- (Note: This version downloads from a mirror site in China, which is fast and usually requires no extra network configuration.)
For users outside China or with a stable proxy:
- Click to download down_huggingface.exe
- (Note: This version downloads from the official Hugging Face website. It requires a stable international internet connection or a properly configured system proxy.)
How to Use:
- Place the downloaded
.exe
file in the main program's folder (together withsp.exe
). - Double-click the
.exe
file you downloaded. A command-line window will open and automatically start downloading all the required models. - The download process may take some time, especially since the
large
series models are very big. Please be patient and wait until the window indicates 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 connection is unstable, the download might fail midway.- If the download fails, don't worry. Simply double-click and run the same
.exe
file again. It supports resuming 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 issue should be resolved