This guide addresses common issues when running the VFS Global automation system as a Windows executable (.exe) file.
Problem: Clicking "Start Bot" causes the status light to turn yellow and then automatically turn off.
Causes & Solutions:
- Missing Dependencies: Ensure all required modules are included in the EXE
- Solution: Use the updated
app_main.specwith comprehensive hiddenimports
- Solution: Use the updated
- Import Path Issues: Modules not found in EXE environment
- Solution: Fixed with proper path resolution in
_ensure_module_paths()
- Solution: Fixed with proper path resolution in
- Threading Issues: VFSBotWorker signals not properly connected
- Solution: Enhanced error handling in BotWorker class
Problem: Clicking "Start Camera" in Image tab causes the executable to stop.
Causes & Solutions:
- Camera Permission: Windows may block camera access for EXE files
- Solution: Run as administrator or grant camera permissions
- OpenCV Cascade Files: Face detection cascade files not found
- Solution: Build script now copies cascade files to EXE directory
- Camera Index Issues: Default camera index (0) may not work
- Solution: Enhanced camera detection tries multiple indices (0, 1, 2)
Problem: Data saved in the application is not being saved correctly.
Causes & Solutions:
- Wrong File Paths: Hardcoded paths don't work in EXE environment
- Solution: Dynamic path resolution based on EXE location
- Permission Issues: EXE may not have write permissions to certain directories
- Solution: Data saved to EXE directory (same folder as executable)
Problem: "Setup has detected that Setup is currently running" error when closing.
Causes & Solutions:
- Multiple Instances: Another instance of the application is running
- Solution: Check Task Manager and close all instances
- Incomplete Shutdown: Application didn't close properly
- Solution: Enhanced cleanup in application shutdown
- Added comprehensive hiddenimports for all dependencies
- Included proper path resolution for both source and EXE environments
- Added all required data files and directories
- Automatic Playwright browser installation
- Creation of required data directories
- Copying of initial configuration files
- OpenCV cascade file copying
- Automatic detection of EXE vs source environment
- Dynamic path resolution for data files
- Proper module import handling
- The first run may take longer as Playwright downloads browser binaries
- Ensure internet connection for initial setup
- Run as administrator if camera access is needed
- All data is saved in the same directory as the EXE
- Create backups of
clients.csvand other data files - The EXE creates
info/,documents/, andlogs/directories automatically
- Grant camera permissions when prompted
- Ensure no other applications are using the camera
- Try different camera indices if the default doesn't work
- Internet connection required for VFS Global website access
- Proxy configuration in
proxies.txtfor better success rates - Playwright browser downloads on first run
VFS-Desktop/
├── VFS-Desktop.exe # Main executable
├── clients.csv # Client data
├── proxies.txt # Proxy configuration
├── config.py # Application configuration
├── haarcascade_frontalface_default.xml # OpenCV cascade file
├── info/ # Image capture data
├── documents/ # Uploaded documents
└── logs/ # Application logs
- Check if all dependencies are installed
- Verify internet connection
- Check proxy configuration in
proxies.txt - Run as administrator
- Check Windows Defender/antivirus settings
- Grant camera permissions
- Close other applications using camera
- Try running as administrator
- Check camera hardware connection
- Verify OpenCV installation
- Check write permissions to EXE directory
- Run as administrator
- Verify disk space
- Check antivirus interference
- Check Windows Event Viewer for error details
- Run from command line to see error messages
- Verify all required files are present
- Check system requirements (Python 3.8+, Windows 10+)
- Windows 10 or later
- 4GB RAM minimum (8GB recommended)
- 2GB free disk space
- Internet connection
- Camera (optional, for image capture)
- Administrator privileges (recommended)
If issues persist after following this guide:
- Check the logs in the
logs/directory - Run the application from command line to see detailed error messages
- Verify all files are present in the EXE directory
- Test with a fresh installation
If EXE deployment continues to have issues, consider:
- Source Code Deployment: Run directly from Python source
- Docker Container: Package in a containerized environment
- Virtual Environment: Use venv for isolated deployment
- Cloud Deployment: Deploy to cloud platform with proper environment setup