openui
openui copied to clipboard
Error executing OpenUI
I'm getting this error on windows
(OpenUI) PS C:\OpenUI\openui\backend> python -m openui
Traceback (most recent call last):
File "C:\Users\rafae\miniconda3\envs\OpenUI\lib\runpy.py", line 196, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\rafae\miniconda3\envs\OpenUI\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\OpenUI\openui\backend\openui_main.py", line 3, in
I'm also getting something similar on ubuntu
(docker) i'm get same error on macos:
image:
same issue here
I traced the Issue back to not installed playwright and pillow packages.
In the file openui/backend/pyproject.toml these two packages are mentioned inside
[project.optional-dependencies] test = ["pytest", "pre-commit"] eval = [ "Pillow>=8.3.1", "playwright>=1.41.0", "beautifulsoup4>=4.0.0", "mistletoe>=1.0.0", ]
After i have replaced them at
[project] dependencies = [ "weave@git+https://github.com/wandb/weave.git@fix/tiktoken-images", "openai>=1.12.0", "ollama>=0.1.7", "itsdangerous>=2.0.1", "peewee>=3.0.0", "fastapi>=0.108.0", "uvicorn>=0.25.0", "fastapi-sso>=0.13.0", "boto3>=1.34.67", "Pillow>=8.3.1", "playwright>=1.41.0", ]
for me the Container is starting and running.
I traced the Issue back to not installed playwright and pillow packages. In the file openui/backend/openui/pyproject.toml these two packages are mentioned inside
[project.optional-dependencies] test = ["pytest", "pre-commit"] eval = [ "Pillow>=8.3.1", "playwright>=1.41.0", "beautifulsoup4>=4.0.0", "mistletoe>=1.0.0", ]
After i have replaced them at[project] dependencies = [ "weave@git+https://github.com/wandb/weave.git@fix/tiktoken-images", "openai>=1.12.0", "ollama>=0.1.7", "itsdangerous>=2.0.1", "peewee>=3.0.0", "fastapi>=0.108.0", "uvicorn>=0.25.0", "fastapi-sso>=0.13.0", "boto3>=1.34.67", "Pillow>=8.3.1", "playwright>=1.41.0", ]
for me the Container is starting and running.
I had the same issue, adding pillow and playwright fixed it for me, Thanks!
one comment - the location of the pyproject.toml is in backend/pyproject.toml for me.
Same issue here (win11 & mac).
after install playwright and pillow I'm getting this error:
Loading personal and system profiles took 679ms.
(base) PS C:\OpenUI\openui\backend> python -m openui
Traceback (most recent call last):
File "
Ok fixed by setting OpenAI environment variable
This error ModuleNotFoundError: No module named 'PIL'
is resolved by installing Pillow package
python -m pip install Pillow
@Swallow74 could you please provide the error message you received?
@Swallow74 could you please provide the error message you received?
I am really dumb, sorry... I was running OpenUI with Pinokio, and I didn't realize that this launcher uses its own conda environment, and so I had to install Pillow inside this env. Sorry again for reporting a problem related to external code.
This is the traceback of commands I run to make openui work for me on macOs (using a local llava instance):
cd backend
python -m pip install Pillow playwright
OPENAI_API_KEY='' python -m openui
crap, sorry everyone. I just fixed this in the main
branch, Pillow and playwright are no longer pulled in by default. We only use them if you're doing evaluations of different prompts / models, more to come there.
If anyone get's this now another quick fix would be to run the following from within the backend
directory:
pip install .[eval]
Ok fixed by setting OpenAI environment variable
How to set up in Win10 @kakachiex2