Fix subprocess issue on Windows and improve development experience #1758
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
Description
This pull request addresses several issues and makes improvements to the Open WebUI backend:
Fixes a syntax warning in the
main.py
file caused by invalid escape sequences in the ASCII art. The fix involves adding ther
prefix before the triple quotes to treat the string as a raw string, eliminating the syntax warning.Resolves the subprocess issue on Windows by modifying the
run_background_process
function inapps\litellm\main.py
. The function now usessubprocess.Popen
instead of theasyncio
subprocess functions to create a subprocess, ensuring compatibility with Windows.Updates the
dev_windows.bat
script to include the necessary changes for handling theWEBUI_SECRET_KEY
and adding the--reload
flag for development purposes.These changes improve the stability and development experience of the Open WebUI backend on Windows systems.
Changelog Entry
Fixed
main.py
caused by invalid escape sequences in the ASCII art.run_background_process
function inapps\litellm\main.py
to usesubprocess.Popen
.Changed
dev_windows.bat
script to handle theWEBUI_SECRET_KEY
and add the--reload
flag for development purposes.Documentation
dev_windows.bat
script.Dependencies