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

ASCII art header backslash problem #1918

Closed
ZedOud opened this issue May 2, 2024 · 0 comments · Fixed by #1965
Closed

ASCII art header backslash problem #1918

ZedOud opened this issue May 2, 2024 · 0 comments · Fixed by #1965
Assignees

Comments

@ZedOud
Copy link

ZedOud commented May 2, 2024

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.

tjbck added a commit that referenced this issue May 3, 2024
@tjbck tjbck self-assigned this May 3, 2024
@tjbck tjbck mentioned this issue May 4, 2024
@tjbck tjbck linked a pull request May 4, 2024 that will close 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

Successfully merging a pull request may close this issue.

2 participants