Is there an existing issue for this?
What happened?
I am getting an uncaught FileNotFound Exception for symlinks that are broken.
Steps to reproduce the problem
- Have a symlink in
models/Lora
- Delete the file the link is pointing to
|
ondisk_mtime = os.path.getmtime(filename) |
raises a FileNotFound exception. Either the webui relies on the directory listing implying that the files are accessible or there is an exists check somewhere which probably would succeed for broken symlinks, even when checking the mtime does not.
What should have happened?
Probably the best way would be to just handle the exception and remove the file from the list. Possibly the console could print a warning.
Commit where the problem happens
39ec4f0
What Python version are you running on ?
Python 3.10.x
Console logs
...
File "/usr/lib/python3.10/genericpath.py", line 55, in getmtime
return os.stat(filename).st_mtime
FileNotFoundError: [Errno 2] No such file or directory: '/xxx/models/Lora/other/brokensymlink.safetensors'
Is there an existing issue for this?
What happened?
I am getting an uncaught
FileNotFoundException for symlinks that are broken.Steps to reproduce the problem
models/Lorastable-diffusion-webui/modules/hashes.py
Line 51 in 39ec4f0
raises a
FileNotFoundexception. Either the webui relies on the directory listing implying that the files are accessible or there is an exists check somewhere which probably would succeed for broken symlinks, even when checking the mtime does not.What should have happened?
Probably the best way would be to just handle the exception and remove the file from the list. Possibly the console could print a warning.
Commit where the problem happens
39ec4f0
What Python version are you running on ?
Python 3.10.x
Console logs