GoAwayNow / HydrausNao

A script to automatically search SauceNao for images and send results to Hydrus Network.
20 stars 3 forks source link

Script breaks if result has an empty percentage #16

Open OuterNeptunium opened 3 years ago

OuterNeptunium commented 3 years ago

If a result for a SauceNao search has an empty percent-similarity value (meaning if a result doesn't have a number for the similarity), the script errors out with the message of ValueError: could not convert string to float: ''

Possible solutions:

This issue has come up time and again in my use. Ideally this could be solved on SauceNao's end, but allowing this script to handle this case would make things much easier if it's not able to be solved there.

GoAwayNow commented 3 years ago

Woah, I've never seen SauceNao return without a similarity number.

Could you possibly send me a file that does this for you so I can test? If it's something you don't want to share here, you can also send it in a direct message to any account on my Linktree, here: https://linktr.ee/GanbatGAN

Normally, I'd offer Discord as an option as well, but they've decided that I must die.

On Sun, Jul 18, 2021 at 6:35 PM OuterNeptunium @.***> wrote:

If a result for a SauceNao search has an empty percent-similarity value (meaning if a result doesn't have a number for the similarity), the script errors out with the message of ValueError: could not convert string to float: ''

Possible solutions:

  • Search using the actual file instead of the thumbnail if this occurs, as those tend to work where the thumbnail fails in this way
  • Tag the result with an identifier (such as [namespace]:error), but otherwise skip over it.

This issue has come up time and again in my use. Ideally this could be solved on SauceNao's end, but allowing this script to handle this case would make things much easier if it's not able to be solved there.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GoAwayNow/HydrausNao/issues/16, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANRNKQ3X2NL2HRISLGXMSV3TYNQNLANCNFSM5ASTRO7Q .

OuterNeptunium commented 3 years ago

Sorry for the delay in the response, I could've sworn I checked more recently.

I sent the image to one of your accounts. Would prefer not to say which one, but it's sent via a link to the source I got it from, so there's no difference between the one I used with SauceNao and the one you'll be using to troubleshoot.

EDIT: Forgot an important detail, sent it shortly after.