[GH-ISSUE #1918] ASCII art header backslash problem #51351

Closed
opened 2026-05-05 12:21:04 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @ZedOud on GitHub (May 2, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/1918

Originally assigned to: @tjbck on GitHub.

Bug Report

Description

Bug Summary:

C:\Apps\open-webui\backend\main.py:88: SyntaxWarning: invalid escape sequence '\ '
  """

Steps to Reproduce:
(Mac)
bash start.sh
(Windows)
start_windows.bat

Expected Behavior:
It runs without that warning.

Actual Behavior:
It still runs, but throws up that warning.

Environment

  • Open WebUI Version: 0.1.123

  • Operating System: Windows 11, macOS Sonoma

Reproduction Details

Confirmation:

  • [ x ] I have read and followed all the instructions provided in the README.md.
  • [ x ] I am on the latest version of both Open WebUI and Ollama.

Installation Method

Installed manually.

Not fixed in dev as of 96d9d34

Additional Information

If you want ASCII art to include unescaped backslashes, you need the raw prefix for strings:

r""" \this is fine\ """

You can even combine raw and format:

rf""" \ this is fine, {1+1} is 2 \ """

Here, I fixed it.
line 76:

print(
    rf"""
  ___                    __        __   _     _   _ ___ 
 / _ \ _ __   ___ _ __   \ \      / /__| |__ | | | |_ _|
| | | | '_ \ / _ \ '_ \   \ \ /\ / / _ \ '_ \| | | || | 
| |_| | |_) |  __/ | | |   \ V  V /  __/ |_) | |_| || | 
 \___/| .__/ \___|_| |_|    \_/\_/ \___|_.__/ \___/|___|
      |_|                                               

      
v{VERSION} - building the best open-source AI user interface.      
https://github.com/open-webui/open-webui
"""
)

Sorry, I'm horribly rusty with properly contributing code.

Originally created by @ZedOud on GitHub (May 2, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/1918 Originally assigned to: @tjbck on GitHub. # Bug Report ## Description **Bug Summary:** ``` C:\Apps\open-webui\backend\main.py:88: SyntaxWarning: invalid escape sequence '\ ' """ ``` **Steps to Reproduce:** (Mac) bash start.sh (Windows) start_windows.bat **Expected Behavior:** It runs without that warning. **Actual Behavior:** It still runs, but throws up that warning. ## Environment - **Open WebUI Version:** 0.1.123 - **Operating System:** Windows 11, macOS Sonoma ## Reproduction Details **Confirmation:** - [ x ] I have read and followed all the instructions provided in the README.md. - [ x ] I am on the latest version of both Open WebUI and Ollama. ## Installation Method Installed manually. Not fixed in dev as of 96d9d34 ## Additional Information If you want ASCII art to include unescaped backslashes, you need the raw prefix for strings: r""" \this is fine\ """ You can even combine raw and format: rf""" \ this is fine, {1+1} is 2 \ """ Here, I fixed it. line 76: ```python print( rf""" ___ __ __ _ _ _ ___ / _ \ _ __ ___ _ __ \ \ / /__| |__ | | | |_ _| | | | | '_ \ / _ \ '_ \ \ \ /\ / / _ \ '_ \| | | || | | |_| | |_) | __/ | | | \ V V / __/ |_) | |_| || | \___/| .__/ \___|_| |_| \_/\_/ \___|_.__/ \___/|___| |_| v{VERSION} - building the best open-source AI user interface. https://github.com/open-webui/open-webui """ ) ``` Sorry, I'm horribly rusty with properly contributing code.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#51351