Database initialization fails after update - sqlite3.OperationalError
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Custom Node Testing
- [ ] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)
### Expected Behavior
Environment:
OS: Windows 11
ComfyUI Desktop Version: Latest (auto-updated)
ComfyUI Core Version: 0.3.60
Python Version: 3.12.9
Description:
ComfyUI Desktop fails to initialize database after updating, making the desktop interface unusable. This is a recurring issue that happens with every update.
Error Message:
Failed to initialize database. Please ensure you have installed the latest requirements. If the error persists, please report this as in future the database will be required: (sqlite3.OperationalError) unable to open database file
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Expected Behavior:
Database should initialize properly after updates, allowing normal desktop app functionality.
### Actual Behavior
Actual Behavior:
Database fails to initialize with sqlite3.OperationalError, breaking the desktop interface despite backend running correctly.
Impact:
This recurring issue makes ComfyUI Desktop unreliable and forces users to troubleshoot after every update.
### Steps to Reproduce
Steps to Reproduce:
Update ComfyUI Desktop (auto-update)
Launch application
Backend starts successfully on port 8000
Database initialization fails
Desktop interface becomes unresponsive
### Debug Logs
```powershell
## ComfyUI-Manager: installing dependencies done.
[2025-09-26 08:28:47.829] ** ComfyUI startup time: 2025-09-26 08:28:47.829
[2025-09-26 08:28:47.829] ** Platform: Windows
[2025-09-26 08:28:47.829] ** Python version: 3.12.9 (main, Feb 12 2025, 14:52:31) [MSC v.1942 64 bit (AMD64)]
[2025-09-26 08:28:47.829] ** Python executable: C:\AI Software\ComfyUI\.venv\Scripts\python.exe
[2025-09-26 08:28:47.829] ** ComfyUI Path: C:\Users\troyt\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI
[2025-09-26 08:28:47.829] ** ComfyUI Base Folder Path: C:\Users\troyt\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI
[2025-09-26 08:28:47.829] ** User directory: C:\AI Software\ComfyUI\user
[2025-09-26 08:28:47.829] ** ComfyUI-Manager config path: C:\AI Software\ComfyUI\user\default\ComfyUI-Manager\config.ini
[2025-09-26 08:28:47.829] ** Log path: C:\AI Software\ComfyUI\user\comfyui.log
[ComfyUI-Manager] Skipped fixing the 'comfyui-frontend-package' dependency because the ComfyUI is outdated.
[2025-09-26 08:28:48.866]
Prestartup times for custom nodes:
[2025-09-26 08:28:48.866] 2.4 seconds: C:\Users\troyt\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\custom_nodes\ComfyUI-Manager
[2025-09-26 08:28:48.866]
[2025-09-26 08:28:50.036] Checkpoint files will always be loaded safely.
[2025-09-26 08:28:50.122] Total VRAM 16303 MB, total RAM 65277 MB
[2025-09-26 08:28:50.123] pytorch version: 2.7.0+cu128
[2025-09-26 08:28:50.123] Set vram state to: NORMAL_VRAM
[2025-09-26 08:28:50.123] Device: cuda:0 NVIDIA GeForce RTX 5070 Ti : cudaMallocAsync
[2025-09-26 08:28:51.131] Using pytorch attention
[2025-09-26 08:28:52.124] Python version: 3.12.9 (main, Feb 12 2025, 14:52:31) [MSC v.1942 64 bit (AMD64)]
[2025-09-26 08:28:52.124] ComfyUI version: 0.3.60
[2025-09-26 08:28:52.144] [Prompt Server] web root: C:\Users\troyt\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\web_custom_versions\desktop_app
[2025-09-26 08:28:53.689] Note: NumExpr detected 24 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 16.
[2025-09-26 08:28:53.689] NumExpr defaulting to 16 threads.
[2025-09-26 08:28:54.076] [34m[ComfyUI-Easy-Use] server: [0mv1.3.1 [92mLoaded[0m
[2025-09-26 08:28:54.076] [34m[ComfyUI-Easy-Use] web root: [0mC:\AI Software\ComfyUI\custom_nodes\comfyui-easy-use\web_version/v2 [92mLoaded[0m
[2025-09-26 08:28:54.092] ComfyUI-GGUF: Partial torch compile only, consider updating pytorch
[2025-09-26 08:28:54.095] ### Loading: ComfyUI-Impact-Pack (V8.17.1)
[2025-09-26 08:28:54.134] [Impact Pack] Wildcards loading done.
[2025-09-26 08:28:54.135] ### Loading: ComfyUI-Impact-Subpack (V1.3.3)
[2025-09-26 08:28:54.137] [Impact Pack/Subpack] Using folder_paths to determine whitelist path: C:\AI Software\ComfyUI\user\default\ComfyUI-Impact-Subpack\model-whitelist.txt
[2025-09-26 08:28:54.137] [Impact Pack/Subpack] Ensured whitelist directory exists: C:\AI Software\ComfyUI\user\default\ComfyUI-Impact-Subpack
[2025-09-26 08:28:54.137] [Impact Pack/Subpack] Loaded 0 model(s) from whitelist: C:\AI Software\ComfyUI\user\default\ComfyUI-Impact-Subpack\model-whitelist.txt
[2025-09-26 08:28:54.346] [Impact Subpack] ultralytics_bbox: C:\AI Software\ComfyUI\models\ultralytics\bbox
[2025-09-26 08:28:54.346] [Impact Subpack] ultralytics_segm: C:\AI Software\ComfyUI\models\ultralytics\segm
[2025-09-26 08:28:54.346] [Impact Subpack] ultralytics_bbox: C:\AI Software\ComfyUI\models\ultralytics\bbox
[2025-09-26 08:28:54.346] [Impact Subpack] ultralytics_segm: C:\AI Software\ComfyUI\models\ultralytics\segm
[2025-09-26 08:28:54.347] ### Loading: ComfyUI-Inspire-Pack (V1.20)
[2025-09-26 08:28:54.395] ----------Jake Upgrade Nodes Loaded----------
[2025-09-26 08:28:54.589] C:\AI Software\ComfyUI\.venv\Lib\site-packages\timm\models\layers\__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)
[2025-09-26 08:28:54.600] [34m[ComfyUI-RMBG][0m v[93m2.4.0[0m | [93m24 nodes[0m [92mLoaded[0m
[2025-09-26 08:28:54.698] Warning: Could not load sageattention: No module named 'sageattention'
[2025-09-26 08:28:54.698] sageattention package is not installed, sageattention will not be available
[2025-09-26 08:28:54.791] ------------------------------------------
[2025-09-26 08:28:54.792] [34mComfyroll Studio v1.76 : [92m 175 Nodes Loaded[0m
[2025-09-26 08:28:54.792] ------------------------------------------
[2025-09-26 08:28:54.792] ** For changes, please see patch notes at https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/blob/main/Patch_Notes.md
[2025-09-26 08:28:54.792] ** For help, please see the wiki at https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki
[2025-09-26 08:28:54.792] ------------------------------------------
[2025-09-26 08:28:54.797] [36;20m[C:\AI Software\ComfyUI\custom_nodes\comfyui_controlnet_aux] | INFO -> Using ckpts path: C:\AI Software\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts[0m
[2025-09-26 08:28:54.798] [36;20m[C:\AI Software\ComfyUI\custom_nodes\comfyui_controlnet_aux] | INFO -> Using symlinks: False[0m
[2025-09-26 08:28:54.798] [36;20m[C:\AI Software\ComfyUI\custom_nodes\comfyui_controlnet_aux] | INFO -> Using ort providers: ['CUDAExecutionProvider', 'DirectMLExecutionProvider', 'OpenVINOExecutionProvider', 'ROCMExecutionProvider', 'CPUExecutionProvider', 'CoreMLExecutionProvider'][0m
[2025-09-26 08:28:54.815] DWPose: Onnxruntime with acceleration providers detected
[2025-09-26 08:28:54.839] Warning: Perth watermarking not available. Audio will be generated without watermarking.
[2025-09-26 08:28:55.041] Warning: Perth watermarking not available. Audio will be generated without watermarking.
[2025-09-26 08:28:55.151]
[2025-09-26 08:28:55.151] [92m[rgthree-comfy] Loaded 47 magnificent nodes. 🎉[0m
[2025-09-26 08:28:55.152]
[2025-09-26 08:28:55.156] [92m[save_image_extended] AVIF is supported! Woohoo![0m
[2025-09-26 08:28:55.156] [92m[save_image_extended][0m JXL is not supported. To add it: pip install jxlpy[0m
[2025-09-26 08:28:55.156] [92m[save_image_extended][0m You will need a valid MSVC env to build the wheel[0m
[2025-09-26 08:28:55.156] [92m[save_image_extended][0m version: 2.64[0m
[2025-09-26 08:28:55.638] [34mWAS Node Suite: [0mOpenCV Python FFMPEG support is enabled[0m
[2025-09-26 08:28:55.638] [34mWAS Node Suite [93mWarning: [0m`ffmpeg_bin_path` is not set in `C:\AI Software\ComfyUI\custom_nodes\was-ns\was_suite_config.json` config file. Will attempt to use system ffmpeg binaries if available.[0m
[2025-09-26 08:28:56.094] [34mWAS Node Suite: [0mFinished.[0m [32mLoaded[0m [0m220[0m [32mnodes successfully.[0m
[2025-09-26 08:28:56.095]
[3m[93m"Art is the language of the heart and the window to the soul."[0m[3m - Unknown[0m
[2025-09-26 08:28:56.095]
[2025-09-26 08:28:56.102] ### Loading: ComfyUI-Manager (V3.36)
[2025-09-26 08:28:56.102] [ComfyUI-Manager] network_mode: public
[2025-09-26 08:28:56.103] ### ComfyUI Revision: UNKNOWN (The currently installed ComfyUI is not a Git repository)
[2025-09-26 08:28:56.116]
Import times for custom nodes:
[2025-09-26 08:28:56.117] 0.0 seconds: C:\Users\troyt\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\custom_nodes\websocket_image_save.py
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\ComfyUI-NanoBanano
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\ComfyUI_bnb_nf4_fp4_Loaders
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\ComfyUI-GGUF
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\cg-use-everywhere
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\save-image-extended-comfyui
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui_essentials
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui-custom-scripts
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui_ultimatesdupscale
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui-frame-interpolation
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\ComfyUI-segment-anything-2
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui-kjnodes
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui-jakeupgrade
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\ComfyUI_Comfyroll_CustomNodes
[2025-09-26 08:28:56.117] 0.0 seconds: C:\Users\troyt\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\custom_nodes\ComfyUI-Manager
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui-videohelpersuite
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui-inspire-pack
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui_controlnet_aux
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui-impact-pack
[2025-09-26 08:28:56.117] 0.0 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui-tosvg
[2025-09-26 08:28:56.117] 0.1 seconds: C:\AI Software\ComfyUI\custom_nodes\ComfyUI-WanVideoWrapper
[2025-09-26 08:28:56.117] 0.1 seconds: C:\AI Software\ComfyUI\custom_nodes\rgthree-comfy
[2025-09-26 08:28:56.117] 0.2 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui-rmbg
[2025-09-26 08:28:56.117] 0.2 seconds: C:\AI Software\ComfyUI\custom_nodes\ComfyUI_Fill-ChatterBox
[2025-09-26 08:28:56.117] 0.2 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui-impact-subpack
[2025-09-26 08:28:56.117] 0.3 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui-detail-daemon
[2025-09-26 08:28:56.117] 0.8 seconds: C:\AI Software\ComfyUI\custom_nodes\comfyui-easy-use
[2025-09-26 08:28:56.117] 0.9 seconds: C:\AI Software\ComfyUI\custom_nodes\was-ns
[2025-09-26 08:28:56.117]
[2025-09-26 08:28:56.363] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json
[2025-09-26 08:28:56.371] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json
[2025-09-26 08:28:56.400] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json
[2025-09-26 08:28:56.449] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json
[2025-09-26 08:28:56.495] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
[2025-09-26 08:28:56.584] Failed to initialize database. Please ensure you have installed the latest requirements. If the error persists, please report this as in future the database will be required: (sqlite3.OperationalError) unable to open database file
(Background on this error at: https://sqlalche.me/e/20/e3q8)
[2025-09-26 08:28:56.602] Starting server
[2025-09-26 08:28:56.602] To see the GUI go to: http://0.0.0.0:8000
[2025-09-26 08:28:59.376] FETCH ComfyRegistry Data: 5/98
[2025-09-26 08:29:03.816] FETCH ComfyRegistry Data: 10/98
[2025-09-26 08:29:07.211] FETCH ComfyRegistry Data: 15/98
[2025-09-26 08:29:10.580] FETCH ComfyRegistry Data: 20/98
[2025-09-26 08:29:13.930] FETCH ComfyRegistry Data: 25/98
[2025-09-26 08:29:17.702] FETCH ComfyRegistry Data: 30/98
[2025-09-26 08:29:21.064] FETCH ComfyRegistry Data: 35/98
[2025-09-26 08:29:24.496] FETCH ComfyRegistry Data: 40/98
[2025-09-26 08:29:27.887] FETCH ComfyRegistry Data: 45/98
[2025-09-26 08:29:31.219] FETCH ComfyRegistry Data: 50/98
[2025-09-26 08:29:34.613] FETCH ComfyRegistry Data: 55/98
[2025-09-26 08:29:38.505] FETCH ComfyRegistry Data: 60/98
[2025-09-26 08:29:42.035] FETCH ComfyRegistry Data: 65/98
[2025-09-26 08:29:45.424] FETCH ComfyRegistry Data: 70/98
[2025-09-26 08:29:48.806] FETCH ComfyRegistry Data: 75/98
[2025-09-26 08:29:52.160] FETCH ComfyRegistry Data: 80/98
[2025-09-26 08:29:55.518] FETCH ComfyRegistry Data: 85/98
[2025-09-26 08:30:02.582] FETCH ComfyRegistry Data: 90/98
[2025-09-26 08:30:06.069] FETCH ComfyRegistry Data: 95/98
[2025-09-26 08:30:08.587] FETCH ComfyRegistry Data [DONE]
[2025-09-26 08:30:08.675] [ComfyUI-Manager] default cache updated: https://api.comfy.org/nodes
[2025-09-26 08:30:08.697] FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json [DONE]
[2025-09-26 08:30:08.882] [ComfyUI-Manager] All startup tasks have been completed.
```
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.