Skip to content

Installation Fails Due to UTF-8 Encoding Error and Application Does Not Automatically Launch WebView After Server Start #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AmesianX opened this issue Apr 3, 2025 · 1 comment

Comments

@AmesianX
Copy link

AmesianX commented Apr 3, 2025

UTF-8 Error

When the installation starts, the server crashes due to a UTF-8 encoding error. So I manually modified the following file to make the server run properly without any errors.

Log

Installed Python Version: Python 3.11.11
"C:\Users\user\AppData\Roaming\Open WebUI\python\Scripts\activate.bat" && uvicorn open_webui.main:app --host "127.0.0.1" --forwarded-allow-ips '*' --port 8081
Starting Open-WebUI server...
Server started with PID: 23932
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [open_webui.env] 'DEFAULT_LOCALE' loaded from the latest database entry
INFO [open_webui.env] 'DEFAULT_PROMPT_SUGGESTIONS' loaded from the latest database entry
WARNI [open_webui.env]

WARNING: CORS_ALLOW_ORIGIN IS SET TO '*' - NOT RECOMMENDED FOR PRODUCTION DEPLOYMENTS.
INFO [open_webui.env] Embedding model set: sentence-transformers/all-MiniLM-L6-v2
WARNI [langchain_community.utils.user_agent] USER_AGENT environment variable not set, consider setting it to identify your requests.
C:\Users\user\AppData\Roaming\Open WebUI\python\Lib\site-packages\open_webui
C:\Users\user\AppData\Roaming\Open WebUI\python\Lib\site-packages
C:\Users\user\AppData\Roaming\Open WebUI\python\Lib

ERROR UTF-8 encoding error

██████╗ ██████╗ ███████╗███╗ ██╗ ██╗ ██╗███████╗██████╗ ██╗ ██╗██╗
██╔═══██╗██╔══██╗██╔════╝████╗ ██║ ██║ ██║██╔════╝██╔══██╗██║ ██║██║
██║ ██║██████╔╝█████╗ ██╔██╗ ██║ ██║ █╗ ██║█████╗ ██████╔╝██║ ██║██║
██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║ ██║███╗██║██╔══╝ ██╔══██╗██║ ██║██║
╚██████╔╝██║ ███████╗██║ ╚████║ ╚███╔███╔╝███████╗██████╔╝╚██████╔╝██║
╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚══╝╚══╝ ╚══════╝╚═════╝ ╚═════╝ ╚═╝

v0.6.0 - building the best open-source AI user interface.

https://github.com/open-webui/open-webui
Fetching 30 files: 0%| | 0/30 [00:00<?, ?it/s]
Fetching 30 files: 100%|##########| 30/30 [00:00<00:00, 39983.83it/s]
INFO: Started server process [32780]
INFO: Waiting for application startup.
2025-04-03 18:35:38.014 | INFO | open_webui.utils.logger:start_logger:140 - GLOBAL_LOG_LEVEL: INFO - {}

My Ugly SOLUTION [c:\Users\xxx\AppData\Roaming\Open WebUI\python\Lib\site-packages\open_webui\main.py]

import asyncio
import inspect
import json
import logging
import mimetypes
import os
import shutil
import sys
import time
import random

# start ugly solution
import io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
# end

from contextlib import asynccontextmanager
from urllib.parse import urlencode, parse_qs, urlparse
from pydantic import BaseModel
from sqlalchemy import text

ISSUE

However, after the server starts, I believe it should automatically open a WebView (or similar) that connects to the local server.
But instead, it just stays running without doing anything.
If I manually open a browser and go to localhost:8080, everything works fine.
But if I understand the purpose of this desktop application correctly, shouldn’t it open the interface inside the application window itself after installation, just like Claude Desktop or LM Studio?

@mazenhassan9
Copy link

I have the same error, did you find any way to fix this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants