AlUlkesh/stable-diffusion-webui-images-browser

Delete image - error

wknudsen opened this issue · 6 comments

When clicking the Delete button I get an error. Verified on two different clean installations of A1111 1.5.1 and Image Browser Jul 31 version.

Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/gradio/routes.py", line 422, in run_predict
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1323, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1051, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/workspace/sd/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser/scripts/image_browser.py", line 412, in delete_image
delete_recycle(filenames[i])
File "/workspace/sd/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser/scripts/image_browser.py", line 235, in delete_recycle
send2trash(filename)
File "/usr/local/lib/python3.10/dist-packages/send2trash/plat_gio.py", line 22, in send2trash
raise TrashPermissionError("")
send2trash.exceptions.TrashPermissionError: [Errno 13] Permission denied: ''

Let's see. Can you answer these questions first?

  1. Which OS are you using?
  2. Is this a local file or on a network drive?
  3. Can you delete the file manually, without getting the permission error?
  1. It's Linux, on a Runpod run Jupyter notebook. Delete has worked in this environment on a previous version last I tried a month or 2 ago.
  2. The file is local seen from the installation's point of view.
  3. I can delete it manually without any errors, from a terminal or the Jupyter file manager.

I see. It's hard for me to tell what does or does not work in that particular environment. It's possible there are further permissions necessary to move files to a system trashcan.

Best suggestion I have currently is to deactivate the trashcan in the Image Browser Settings and let the program do a direct delete:

image

Delete works with the recycle bin disabled, thanks for the suggestion.

... and thank you for a marvellous extension, it's about the first one I install on a new server.

Thank you.