Skip to content
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

Fix subprocess issue on Windows and improve development experience #1758

Closed
wants to merge 0 commits into from

Conversation

kroonen
Copy link
Contributor

@kroonen kroonen commented Apr 26, 2024

Pull Request Checklist

  • Description: Briefly describe the changes in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?

Description

This pull request addresses several issues and makes improvements to the Open WebUI backend:

  1. Fixes a syntax warning in the main.py file caused by invalid escape sequences in the ASCII art. The fix involves adding the r prefix before the triple quotes to treat the string as a raw string, eliminating the syntax warning.

  2. Resolves the subprocess issue on Windows by modifying the run_background_process function in apps\litellm\main.py. The function now uses subprocess.Popen instead of the asyncio subprocess functions to create a subprocess, ensuring compatibility with Windows.

  3. Updates the dev_windows.bat script to include the necessary changes for handling the WEBUI_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

  • Fixed a syntax warning in main.py caused by invalid escape sequences in the ASCII art.
  • Resolved the subprocess issue on Windows by modifying the run_background_process function in apps\litellm\main.py to use subprocess.Popen.

Changed

  • Updated the dev_windows.bat script to handle the WEBUI_SECRET_KEY and add the --reload flag for development purposes.

Documentation

  • Updated the development documentation to include instructions for running the backend on Windows using the modified dev_windows.bat script.

Dependencies

  • No new dependencies were added.
  • No changes to the dependency versions were made.

@kroonen kroonen changed the title fixed missing favicon and Fix subprocess issue on Windows and improve development experience Apr 26, 2024
backend/apps/litellm/main.py Outdated Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

None yet

2 participants