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

Unprompted cannot differentiate between a template file and a template subfolder when named the same #211

Open
3 tasks done
SlappedWithSilence opened this issue Oct 29, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@SlappedWithSilence
Copy link

Due diligence

  • I checked for similar issues and couldn't find any.
  • My WebUI and Unprompted are both up-to-date.
  • I disabled my other extensions but the problem persists.

Describe the bug

Take the following directory structure:

templates\char_a\face.txt
templates\char_a.txt

The following prompt results in an unprompted error:
[file char_a]

 PermissionError: [Errno 13] Permission denied: 'H:\\Projects\\Projects\\Tools\\Stable Diffusion\\stable-diffusion-webui\\extensions\\_unprompted/templates/char_a'

Prompt

See above

Log output

See above

Unprompted version

10.2.3

WebUI version

1.6.0

Other comments

No response

@SlappedWithSilence SlappedWithSilence added the bug Something isn't working label Oct 29, 2023
@ThereforeGames
Copy link
Owner

Hi @SlappedWithSilence,

Thank you for reaching out. I'm able to reproduce the bug with conflicting directory/file names and will give some thought to the best solution.

In the meantime, it is possible to explicitly specify that your path is a file by including the extension, e.g.

[call char_a.txt]

I hope that helps.

@SlappedWithSilence
Copy link
Author

That does help. Thank you. Are you open to contribution? If so, do you have a contrib guide/standards doc? I didn't see anything in the readme.

@ThereforeGames
Copy link
Owner

Yes! Contributions are certainly welcome, I just haven't had the opportunity to set up any guidelines.

The only unusual thing about my codebase that comes to mind is the use of tabs instead of spaces, and I would ask that you keep to this convention when submitting a PR.

Thanks for checking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants