Skip to content

fix: correct PYTHONPATH for extentions installation proccess#15704

Closed
shsotoudegan wants to merge 1 commit intoAUTOMATIC1111:devfrom
shsotoudegan:dev
Closed

fix: correct PYTHONPATH for extentions installation proccess#15704
shsotoudegan wants to merge 1 commit intoAUTOMATIC1111:devfrom
shsotoudegan:dev

Conversation

@shsotoudegan
Copy link
Copy Markdown

@shsotoudegan shsotoudegan commented May 4, 2024

Description

  • Corrected the PYTHONPATH environment variable to ensure it contains the correct stable-diffusion-webui root directory path during the extension installation process.
  • Added a nested try/except block within the run_extension_installer function. The try block attempts to add the correct stable-diffusion-webui root path to the PYTHONPATH environment variable. It does this by converting the relative path (from modules/launch_utils.py to the project root) to an absolute path. The Path from the pathlib library is imported for this purpose.
  • Code style has been checked with python -m ruff check
  • I solved the problem that described in [Feature Request]: Extentions can't use A1111 modules in correct way #15697

Checklist:

@w-e-w
Copy link
Copy Markdown
Collaborator

w-e-w commented May 4, 2024

why would you need the .resolve() are you working with symlinks?

@shsotoudegan
Copy link
Copy Markdown
Author

why would you need the .resolve() are you working with symlinks?

yes. that's can remove.

@w-e-w
Copy link
Copy Markdown
Collaborator

w-e-w commented May 4, 2024

yes. that's can remove.

well then this PR is redundant

there's absolutely no need of adding a try block for doing the exact same thing twice
the point is to use the actual webui root and not cwd

closing this

@w-e-w w-e-w closed this May 4, 2024
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.

2 participants