Random errors when auto-tagging
bokerlol opened this issue · comments
Hello again! I'm receiving this error when auto tagging and I can't seem to track down what image/video is causing it. I had thought videos were the problem since I don't think saucenao/deepbooru accept videos but I had it scan just a video of mine and it just skipped it, which i assume is the intended behavior. And didn't error out at all.
The error:
Z:\Misc\szurubooru\szurubooru-scripts-main>python3 auto_tagger.py tag-count:0
Found 51 posts. Start tagging...
0%| | 0/51 [00:00<?, ?it/s]Could not get result from SauceNAO with uploaded image: HTTP Error 403: Forbidden
Traceback (most recent call last):
File "auto_tagger.py", line 129, in <module>
main()
File "auto_tagger.py", line 65, in main
tags, source, rating, limit_short, limit_long = saucenao.get_metadata(post)
File "C:\Users\shrev\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\syncer.py", line 44, in run
return asyncio.get_event_loop().run_until_complete(f(*args, **kwargs))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 616, in run_until_complete
return future.result()
File "Z:\Misc\szurubooru\szurubooru-scripts-main\classes\saucenao.py", line 64, in get_metadata
if results.results:
AttributeError: 'NoneType' object has no attribute 'results'
I know I'm not being rate limited by Saucenao as I'm tracking my API usage and I still have about 1500 hits left.
Any ideas to narrow down what exactly is causing the issue?
Config:
{
"szurubooru": {
"url": "https://booru.mydomain.com",
"api_token": "token",
"public": "False"
},
"auto_tagger": {
"saucenao_api_key": "token",
"hide_progress": "False",
"local_temp_path": "Z:/Misc/szurubooru/szurubooru-scripts-main/tmp",
"use_saucenao": "True",
"deepbooru_enabled": "True",
"deepbooru_model": "Z:/Misc/szurubooru/szurubooru-scripts-main/misc/deepbooru/model-resnet_custom_v3.h5",
"deepbooru_threshold": "0.7",
"boorus": {
"danbooru": {
"user": "None",
"api_key": "None"
},
"gelbooru": {
"user": "None",
"api_key": "None"
},
"konachan": {
"user": "None",
"password": "None"
},
"yandere": {
"user": "None",
"password": "None"
},
"pixiv": {
"user": "None",
"password": "None",
"token": "None"
}
}
},
"upload_images": {
"upload_dir": "I:/Images/Importing",
"hide_progress": "False",
"cleanup": "False",
"tags": ["tagme"]
}
}
Resolved. Was an issue being caused by DNS issues making the auto-tagger to the be cut off somewhere along the line. Switched to localhost as the URL to the site and that resolved it.