-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assrt provider rate limited error #1953
Comments
From https://assrt.net/api/doc#api%E9%85%8D%E9%A2%9D (Google translate):
Based on that, I'll add some pause to the provider to prevent making more than 20 queries to the API. Please test the upcoming beta and confirm if it fixes your issue. |
My newly create account on assrt shows only 5 queries per minute, maybe the site changed default quota to 5 queries/minute without update the api doc page. |
That's more complicated. I'm not speakign the language, maybe you can get in relation with the admins and try to clarify this maximum number of queries per minutes? |
@morpheus65535 OK, I'll try to contact assrt site admin, will feedback later. Thanks! |
Failed to get response from assrt admin.. As assrt api doc indicates ( http://assrt.net/api/doc#userquota ), query rate can be obtained by api: If an option to allow user set his query rate to assrt is not currently applicable, maybe lower down to 5 is a more simple solution? Thanks. |
I've added a call to get the proper maximum number of requests per minute. It should be fine in upcoming beta. Can you test and confirm please? |
Great! |
I have tested v1.1.2-beta.20, it dosen't show error detail, can't tell what error I'm facing.. |
This is the part where the provider is removed from the throttled providers. You have to look earlier to see what caused this exception. |
logs filtered by 'assrt' show as bellow. bazarr v1.1.2-beta.20 started about a few minutes befroe 12/10/2022 01:41:08.
I'll give it a try with debug log enabled, and see what will come. |
There's not many information available about error code on the API doc page. 493 and 509 seems to be the issue but without knowing what caused it, it's hard to say. |
When I try curl "https://api.assrt.net/v1/sub/search?token=&q=How+It%27s+Made+S07E01&is_file=1" in shell, return result ok, not read timeout err. |
I've made some improvements that will be part of upcoming beta. Can you test it please? |
OK, I'll have a test when it's available. |
Tested v1.1.2 release, error log filtered by keyword 'assrt' shows some KeyError, is it about api key of assrt site?
|
Those KeyError are caused by the API actually returning no subtitles details. Bazarr try to access directly the first one of none so it raise an exception. I can try to fix it but it won't be elegant. It will not throttle provider anymore but won'T be able to download the subtitles either. |
Please test upcoming beta and provide feedback. |
tested 1.1.3-beta.0, error log frequency seams reduced.
|
As assrt api doc says (translate to english by google: http://assrt.net/api/doc#errors
status code should be parsed to explain what error happened instead of http error code. eg. status 30900 should be 'Quota Exceeded'
|
Should be improved in next beta. |
Good, I'll have a test when ready. |
tested 1.1.3-beta.12, seams not logging detailed status code:
|
I've been lazy with my previous fix. This one should make it. Could you test upcoming beta please? |
Thank you for your active hardworking on this. I'm having 1.1.3-beta.15 running now, will feedback later. |
throttled a lot, and even quota number returned is 0. here are some sample logs:
|
I've fixed one small error I made. Can you test upcoming beta please? |
I've test 1.1.3-beta.21, some throttled logs as bellow. Is it better to show detailed json respone from api server, which would tell us what really happened?
|
@ycflash it seems they've implemented some kind of cloudflare protection. I won't fight with them. No time to lose into that. |
don't see any cf related response of my test. But, thank you anyway. thanks! |
I'm open to PR if smeone want to dive further into it. |
Hi, assrt provider has a query rate limit 5/min as (refer: assrt api doc).
error like this:
Throttling assrt for 10 minutes, until 22/09/22 10:52, because of: HTTPError. Exception info: '509 Server Error: for url: https://api.assrt.net/v1/sub/search?token=<token>&q=How+It%27s+Made+S07E01&is_file=1'
Is a query rate function possible on this provider?
The text was updated successfully, but these errors were encountered: