From a71172eaf9ca995d78f82636924c65a13ece5fe3 Mon Sep 17 00:00:00 2001 From: Po1nt9 Date: Wed, 27 May 2026 01:30:18 +0800 Subject: [PATCH] fix(ci): add missing bcrypt, PyJWT, paramiko hidden imports for web builds The web builds (Windows/macOS/Linux) were missing bcrypt, PyJWT, and paramiko as hidden imports and pip dependencies, causing the packaged executables to fail at startup with ModuleNotFoundError for bcrypt. Also added bcrypt, PyJWT, and paramiko to pip install step so they are available for PyInstaller to collect. Fixed urllib3 not being found by adding requests to pip install. --- .github/workflows/build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8f8903d..fa0ca09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -533,7 +533,7 @@ jobs: - name: 安装依赖 run: | python -m pip install --upgrade pip setuptools wheel - pip install nicegui requests pyinstaller + pip install nicegui requests bcrypt PyJWT paramiko pyinstaller - name: 下载 UPX run: | Invoke-WebRequest -Uri "https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-win64.zip" -OutFile upx.zip @@ -552,6 +552,7 @@ jobs: --hidden-import starlette --hidden-import fastapi ` --hidden-import httptools --hidden-import websockets ` --hidden-import requests --hidden-import urllib3 --hidden-import certifi ` + --hidden-import bcrypt --hidden-import jwt --hidden-import paramiko ` --collect-data nicegui --collect-submodules nicegui ` --exclude-module torch --exclude-module tensorflow ` --exclude-module scipy --exclude-module matplotlib ` @@ -591,7 +592,7 @@ jobs: - name: 安装依赖 run: | python -m pip install --upgrade pip setuptools wheel - pip install nicegui requests pyinstaller + pip install nicegui requests bcrypt PyJWT paramiko pyinstaller - name: PyInstaller 打包 run: | pyinstaller \ @@ -605,6 +606,7 @@ jobs: --hidden-import=starlette --hidden-import=fastapi \ --hidden-import=httptools --hidden-import=websockets \ --hidden-import=requests --hidden-import=urllib3 --hidden-import=certifi \ + --hidden-import=bcrypt --hidden-import=jwt --hidden-import=paramiko \ --collect-data nicegui --collect-submodules nicegui \ --exclude-module torch --exclude-module tensorflow \ --exclude-module scipy --exclude-module matplotlib \ @@ -647,7 +649,7 @@ jobs: - name: 安装 Python 依赖 run: | python -m pip install --upgrade pip setuptools wheel - pip install nicegui requests pyinstaller + pip install nicegui requests bcrypt PyJWT paramiko pyinstaller - name: PyInstaller 打包 run: | pyinstaller \