Skip to content

[Bug]: NameError loading styles.py (initializing the StyleDatabase) on dev branch #15573

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

Closed
3 of 6 tasks
MisterSeajay opened this issue Apr 19, 2024 · 2 comments
Closed
3 of 6 tasks
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@MisterSeajay
Copy link
Contributor

MisterSeajay commented Apr 19, 2024

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

When loading the WebUI from the dev branch, the following error happens:

venv ".venv-3.10\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.7.0-875-g8199e7f0
Commit hash: 8199e7f04fd4121a694d8d81c275b65f76e9522d
CUDA 12.1
Launching Web UI with arguments: --data-dir=S:\GenAI\ImageGen\data --ckpt-dir=S:\GenAI\ImageGen\data\models\checkpoints --clip-models-path=S:\GenAI\ImageGen\data\models\clip --embeddings-dir=S:\GenAI\ImageGen\data\models\embeddings --vae-dir=S:\GenAI\ImageGen\data\models\vaeE --styles-file=S:\GenAI\ImageGen\data\styles.csv --enable-insecure-extension-access --listen --theme=dark --no-half-vae --xformers
Traceback (most recent call last):
  File "S:\GenAI\ImageGen\stable-diffusion-webui\launch.py", line 48, in <module>
    main()
  File "S:\GenAI\ImageGen\stable-diffusion-webui\launch.py", line 44, in main
    start()
  File "S:\GenAI\ImageGen\stable-diffusion-webui\modules\launch_utils.py", line 465, in start
    import webui
  File "S:\GenAI\ImageGen\stable-diffusion-webui\webui.py", line 13, in <module>
    initialize.imports()
  File "S:\GenAI\ImageGen\stable-diffusion-webui\modules\initialize.py", line 36, in imports
    shared_init.initialize()
  File "S:\GenAI\ImageGen\stable-diffusion-webui\modules\shared_init.py", line 41, in initialize
    shared.prompt_styles = styles.StyleDatabase(shared.styles_filename)
  File "S:\GenAI\ImageGen\stable-diffusion-webui\modules\styles.py", line 96, in __init__
    self.path = path
NameError: name 'path' is not defined. Did you mean: 'paths'?

Steps to reproduce the problem

  1. Checkout the dev branch
  2. Load the WebUI with the --styles-file command line argument
  3. The error appears on start-up

What should have happened?

WebUI should have loaded successfully?!

What browsers do you use to access the UI ?

Microsoft Edge

Sysinfo

N/A for this issue; bug is pretty clear in the code & PR is already on the way

Console logs

N/A for this issue; bug is pretty clear in the code & PR is already on the way

Additional information

This module was working on my local version until recently; I reset my dev branch to copy the AUTOMATIC1111 one and this bug appeared.

@MisterSeajay
Copy link
Contributor Author

Deleted local dev branch and pulled down a fresh copy. Unable to repro this issue on the latest version of dev.

@MisterSeajay
Copy link
Contributor Author

Closing issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

1 participant