unprompted icon indicating copy to clipboard operation
unprompted copied to clipboard

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

Open unwize opened this issue 2 years ago • 3 comments
trafficstars

Due diligence

  • [X] I checked for similar issues and couldn't find any.
  • [X] My WebUI and Unprompted are both up-to-date.
  • [X] 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

unwize avatar Oct 29 '23 22:10 unwize

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.

ThereforeGames avatar Oct 30 '23 19:10 ThereforeGames

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.

unwize avatar Oct 30 '23 19:10 unwize

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!

ThereforeGames avatar Oct 30 '23 21:10 ThereforeGames