From 0ee3f1003e4a3fa5a16cb88e0819b409949d6560 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Fri, 26 Dec 2025 10:34:11 -0800 Subject: [PATCH] Fix Windows build: Add FastAPI and dependencies to hiddenimports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed PyInstaller build error on Windows: "ModuleNotFoundError: No module named 'fastapi'" Added to hiddenimports: - FastAPI and its core modules - Starlette (FastAPI framework base) - Pydantic (data validation) - anyio, sniffio (async libraries) - h11, websockets (protocol implementations) - requests and dependencies (for server sync client) This ensures all web server dependencies are bundled in the executable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- local-transcription.spec | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/local-transcription.spec b/local-transcription.spec index e511e04..3f5d2b1 100644 --- a/local-transcription.spec +++ b/local-transcription.spec @@ -37,7 +37,25 @@ a = Analysis( 'scipy', 'scipy.signal', 'numpy', + # FastAPI and dependencies 'fastapi', + 'fastapi.routing', + 'fastapi.responses', + 'starlette', + 'starlette.applications', + 'starlette.routing', + 'starlette.responses', + 'starlette.websockets', + 'starlette.middleware', + 'starlette.middleware.cors', + 'pydantic', + 'pydantic.fields', + 'pydantic.main', + 'anyio', + 'anyio._backends', + 'anyio._backends._asyncio', + 'sniffio', + # Uvicorn and dependencies 'uvicorn', 'uvicorn.logging', 'uvicorn.loops', @@ -45,10 +63,21 @@ a = Analysis( 'uvicorn.protocols', 'uvicorn.protocols.http', 'uvicorn.protocols.http.auto', + 'uvicorn.protocols.http.h11_impl', 'uvicorn.protocols.websockets', 'uvicorn.protocols.websockets.auto', + 'uvicorn.protocols.websockets.wsproto_impl', 'uvicorn.lifespan', 'uvicorn.lifespan.on', + 'h11', + 'websockets', + 'websockets.legacy', + 'websockets.legacy.server', + # Requests (for server sync) + 'requests', + 'urllib3', + 'certifi', + 'charset_normalizer', ], hookspath=[], hooksconfig={},