[BUG] YouTube Shorts stuck in infinite "Generated Title is too long" loop on Windows
Author: gamingwithmemeplay-aiCreated May 31, 2026Updated Jun 9, 2026
Bug Report: YouTube Shorts stuck in infinite "Generated Title is too long" loop on Windows
Environment:
- OS: Windows 11
- Python: 3.12.13
- MoneyPrinterV2 branch: main
What I did (step by step)
- Cloned the repo and copied
config.example.jsontoconfig.json - Created a virtual environment with
python -m venv venvand activated it - Installed dependencies with
pip install -r requirements.txt - Configured
config.jsonwith:nanobanana2_api_key: valid Gemini API keynanobanana2_model: tried bothgemini-3.1-flash-image-previewandgemini-1.5-flashimagemagick_path: correct path tomagick.exeollama_model:llama3(Ollama installed and running)
- Fixed
seleniumcompatibility error by downgrading toselenium==4.15.0 - Fixed
moviepyerror by installingmoviepy==1.0.3 - Added
geckodriver.exeto the project root folder - Added geckodriver path to
PATHwithset PATH=%PATH%;C:\Users\...\MoneyPrinterV2-main - Set
HF_TOKENenvironment variable with a valid HuggingFace token - Successfully reached the YouTube Shorts menu and selected "Upload Short"
What happens
After selecting "Upload Short", the program downloads the TTS voice models correctly, but then gets stuck in an infinite loop:
Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
⚠️ Generated Title is too long. Retrying...
⚠️ Generated Title is too long. Retrying...
⚠️ Generated Title is too long. Retrying...This loop never ends. I left it running for over 40 minutes and it never progressed past this point.
What I tried to fix it
- Changed
nanobanana2_modelfromgemini-3.1-flash-image-previewtogemini-1.5-flash→ same result - Set
HF_TOKENenvironment variable → same result - Restarted the program multiple times → same result
Questions
- Is there a maximum title length configured somewhere that I can adjust?
- Is
gemini-3.1-flash-image-previewstill a supported model string for the Gemini API? - Is there a way to debug what title is being generated before it gets rejected?
Thank you!
Source: FujiwaraChoki/MoneyPrinterV2