diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 6250dd947e..7dc765a56c 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -608,7 +608,7 @@ class SPAStaticFiles(StaticFiles): if LOG_FORMAT != 'json': - print(rf""" + banner = rf""" ██████╗ ██████╗ ███████╗███╗ ██╗ ██╗ ██╗███████╗██████╗ ██╗ ██╗██╗ ██╔═══██╗██╔══██╗██╔════╝████╗ ██║ ██║ ██║██╔════╝██╔══██╗██║ ██║██║ ██║ ██║██████╔╝█████╗ ██╔██╗ ██║ ██║ █╗ ██║█████╗ ██████╔╝██║ ██║██║ @@ -620,7 +620,12 @@ if LOG_FORMAT != 'json': v{VERSION} - building the best AI user interface. {f'Commit: {WEBUI_BUILD_HASH}' if WEBUI_BUILD_HASH != 'dev-build' else ''} https://github.com/open-webui/open-webui -""") +""" + try: + print(banner) + except UnicodeEncodeError: + # Stdout can't encode the box-drawing banner (Windows cp1252, redirected/headless stdout); fall back to ASCII. + print(f'Open WebUI v{VERSION} - building the best AI user interface.\nhttps://github.com/open-webui/open-webui') @asynccontextmanager