You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Providing a more informative error message. Perhaps something along the lines of f'Deepbooru could not guess tags for image! Maximum inference was {np.amax(results)}, while threshold is {threshold}!' Would also be helpful to print which image caused the error.
Returning early within the if not tags block.
The text was updated successfully, but these errors were encountered:
Currently, if
tags
doesn't become populated, then the following code path is taken:The following
if
statement prints a warning message with no other logic:szurubooru-toolkit/src/szurubooru_toolkit/deepbooru.py
Line 102 in 2ec633d
Because the
else
block is ignored,rating
is not assigned a value before being referenced, causing the script to crash here:szurubooru-toolkit/src/szurubooru_toolkit/deepbooru.py
Line 119 in 2ec633d
This can be handled better by
f'Deepbooru could not guess tags for image! Maximum inference was {np.amax(results)}, while threshold is {threshold}!'
Would also be helpful to print which image caused the error.if not tags
block.The text was updated successfully, but these errors were encountered: