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 windows crush #45

Closed
wants to merge 1 commit into from
Closed

Fix windows crush #45

wants to merge 1 commit into from

Conversation

Enrypint
Copy link

stable-diffusion-webui\extensions\tag-autocomplete\scripts\tag_autocomplete_helper.py", line 18, in get_tags_base_path
    if (script_path.is_relative_to(EXT_PATH)):
AttributeError: 'WindowsPath' object has no attribute 'is_relative_to'

This fix solves that problem. If the code is not very nice, you can suggest something better.

is_relative_to does not exist for the WindowsPath object
@DominikDoom
Copy link
Owner

I'm on windows too and this error doesn't happen to me. Which Python version are you using?
is_relative_to was introduced with Python 3.9, so for 3.10.6 which the webui recommends you should have no problem.

Now I'm not against your version, just wondering if it's necessary since I do find the "modern" version a bit more elegant.

@Enrypint
Copy link
Author

I tried to find information about this, but I didn't realize it was only in the new python. I used python 3.8 and python and some online compiler site, and both gave a similar error. So I thought it only worked on linux. Sorry for the false PR.

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