Describe the bug
Bazarr returns:
Throttling addic7ed for 10 minutes, until 20/11/20 16:48, because of: OSError. Exception info: 'Connection lost or timed out during API request'
Unexpected error in provider 'addic7ed': Traceback (most recent call last):
File "/app/bazarr/bazarr/../libs/subliminal_patch/core.py", line 170, in list_subtitles_provider results = self[provider].list_subtitles(video, provider_languages)
File "/app/bazarr/bazarr/../libs/subliminal_patch/core.py", line 105, in __getitem__ provider.initialize()
File "/app/bazarr/bazarr/../libs/subliminal_patch/providers/addic7ed.py", line 132, in initialize result = pitcher.throw()
File "/app/bazarr/bazarr/../libs/subliminal_patch/pitcher.py", line 87, in throw data = self._throw()
File "/app/bazarr/bazarr/../libs/subliminal_patch/pitcher.py", line 216, in _throw data = self.client.decode(timeout=self.timeout, type=4, token_params=payload)
File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 203, in decode uploaded_captcha = self.upload(captcha, **kwargs)
File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 482, in upload response = self._call('upload', data)
File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 417, in _call self._call('login', self.userpwd.copy())
File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 435, in _call raise IOError('Connection lost or timed out during API request')OSError: Connection lost or timed out during API request
When trying to download subtitles.
To Reproduce
Steps to reproduce the behavior:
Configure Addic7ed and DeathByCaptcha providers
Expected behavior
Captcha solved, subtitle downloaded
Screenshots
If applicable, add screenshots to help explain your problem.
Software (please complete the following information):
Bazarr Version: 0.9.0.6
Sonarr Version: 2.0.0.5344
Radarr Version: 0.2.0.1504
Using linuxserver docker container on UnRAID.
Operating System: Linux-5.8.18-Unraid-x86_64-with
Python Version: 3.8.5
Bazarr Directory: /app/bazarr
Bazarr Config Directory: /config
Additional context
Snippet of relevant logs:
20/11/2020 15:29:50|INFO |subliminal_patch.core |Using 4 threads for 4 providers (['addic7ed', 'opensubtitles', 'subscenter', 'yifysubtitles'])|
20/11/2020 15:29:50|INFO |subliminal_patch.core |Downloading best subtitles for
20/11/2020 15:29:50|INFO |subliminal_patch.core |Initializing provider opensubtitles|
20/11/2020 15:29:50|INFO |subliminal_patch.core |Skipping provider 'subscenter': no language to search for|
20/11/2020 15:29:50|DEBUG |subliminal_patch.providers.addic7ed|Addic7ed: using random user agents|
20/11/2020 15:29:50|INFO |subliminal_patch.core |Skipping provider 'yifysubtitles': not a valid video|
20/11/2020 15:29:50|DEBUG |subliminal_patch.providers.opensubtitles|Using timeout: 15|
20/11/2020 15:29:50|DEBUG |subliminal_patch.providers.opensubtitles|Using HTTPS connection|
20/11/2020 15:29:50|INFO |subliminal_patch.providers.addic7ed|Addic7ed: Logging in|
20/11/2020 15:29:50|DEBUG |urllib3.connectionpool |Starting new HTTPS connection (1): www.addic7ed.com:443|
20/11/2020 15:29:50|DEBUG |subliminal_patch.http |DNS: Falling back to default DNS or IP on www.addic7ed.com|
20/11/2020 15:29:50|DEBUG |subliminal_patch.providers.opensubtitles|Using previous login token: 'pRpz4XYBtfXXXXXXXXXXXXXXXXX'|
20/11/2020 15:29:50|INFO |subliminal_patch.providers.opensubtitles|Searching subtitles [{'moviehash': '0b8dbc5ba14232c5', 'moviebytesize': '3466460343', 'sublanguageid': 'eng'}, {'imdbid': '0413573', 'season': 2, 'episode': 23, 'sublanguageid': 'eng'}]|
20/11/2020 15:29:50|DEBUG |urllib3.connectionpool |Starting new HTTPS connection (1): vip-api.opensubtitles.org:443|
20/11/2020 15:29:50|DEBUG |subliminal_patch.http |DNS: Falling back to default DNS or IP on vip-api.opensubtitles.org|
20/11/2020 15:29:51|DEBUG |urllib3.connectionpool |https://vip-api.opensubtitles.org:443 "POST /xml-rpc HTTP/1.1" 200 2313|
20/11/2020 15:29:51|DEBUG |subliminal_patch.providers.opensubtitles|Found subtitle
20/11/2020 15:29:51|INFO |subliminal_patch.providers.addic7ed|Addic7ed: Solving captcha. This might take a couple of minutes, but should only happen once every so often|
20/11/2020 15:29:51|ERROR |subliminal_patch.core |Unexpected error in provider 'addic7ed': Traceback (most recent call last): File "/app/bazarr/bazarr/../libs/subliminal_patch/core.py", line 170, in list_subtitles_provider results = self[provider].list_subtitles(video, provider_languages) File "/app/bazarr/bazarr/../libs/subliminal_patch/core.py", line 105, in __getitem__ provider.initialize() File "/app/bazarr/bazarr/../libs/subliminal_patch/providers/addic7ed.py", line 132, in initialize result = pitcher.throw() File "/app/bazarr/bazarr/../libs/subliminal_patch/pitcher.py", line 87, in throw data = self._throw() File "/app/bazarr/bazarr/../libs/subliminal_patch/pitcher.py", line 216, in _throw data = self.client.decode(timeout=self.timeout, type=4, token_params=payload) File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 203, in decode uploaded_captcha = self.upload(captcha, *kwargs) File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 482, in upload response = self._call('upload', data) File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 417, in _call self._call('login', self.userpwd.copy()) File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 435, in _call raise IOError('Connection lost or timed out during API request')OSError: Connection lost or timed out during API request|Traceback (most recent call last): File "/app/bazarr/bazarr/../libs/subliminal_patch/core.py", line 170, in list_subtitles_provider results = self[provider].list_subtitles(video, provider_languages) File "/app/bazarr/bazarr/../libs/subliminal_patch/core.py", line 105, in __getitem__ provider.initialize() File "/app/bazarr/bazarr/../libs/subliminal_patch/providers/addic7ed.py", line 132, in initialize result = pitcher.throw() File "/app/bazarr/bazarr/../libs/subliminal_patch/pitcher.py", line 87, in throw data = self._throw() File "/app/bazarr/bazarr/../libs/subliminal_patch/pitcher.py", line 216, in _throw data = self.client.decode(timeout=self.timeout, type=4, token_params=payload) File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 203, in decode uploaded_captcha = self.upload(captcha, *kwargs) File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 482, in upload response = self._call('upload', data) File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 417, in _call self._call('login', self.userpwd.copy()) File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 435, in _call raise IOError('Connection lost or timed out during API request')OSError: Connection lost or timed out during API request|
20/11/2020 15:29:51|INFO |root |Throttling addic7ed for 10 minutes, until 20/11/20 15:39, because of: OSError. Exception info: 'Connection lost or timed out during API request'|
20/11/2020 15:29:51|INFO |socketio.server |emitting event "event" to all [/]|
20/11/2020 15:29:51|INFO |engineio.server |e132519a732f4b199ec00ec34e3a0933: Sending packet MESSAGE data 2["event","{\"type\": \"badges_providers\", \"action\": null, \"series\": null, \"episode\": null, \"movie\": null, \"task\": null}"]|
20/11/2020 15:29:51|INFO |subliminal_patch.core |Discarding provider addic7ed|
Troubleshooting tried so far:
Confirmed user/pass working for Addic7ed.
Confirm user/pass working for DeathByCaptcha.
Confirmed outgoing TCP ports needed for DeathByCaptcha (8123-8130) not being blocked.
Tried a wrong password for DeathByCaptcha on purpose looking for invalid credential error, but same error was thrown.
Could be an issue with the DeathByCaptcha API itself, but have no way to check that myself.
I've just tested and it works fine for me. Can you test again just to be sure it was not an issue with DBC API?
So strange, when I jumped back in there were a few log entries about captcha not solved from about 20 mins and 2 hours ago, which to me would indicate its getting further through the workflow, but when I tried it by searching for a wanted series item, I got the same thing:
Throttling addic7ed for 10 minutes, until 20/11/20 21:58, because of: OSError. Exception info: 'Connection lost or timed out during API request' | a few seconds ago
-- | --
聽 | Unexpected error in provider 'addic7ed': Traceback (most recent call last): File "/app/bazarr/bazarr/../libs/subliminal_patch/core.py", line 170, in list_subtitles_provider results = self[provider].list_subtitles(video, provider_languages) File "/app/bazarr/bazarr/../libs/subliminal_patch/core.py", line 105, in __getitem__ provider.initialize() File "/app/bazarr/bazarr/../libs/subliminal_patch/providers/addic7ed.py", line 132, in initialize result = pitcher.throw() File "/app/bazarr/bazarr/../libs/subliminal_patch/pitcher.py", line 87, in throw data = self._throw() File "/app/bazarr/bazarr/../libs/subliminal_patch/pitcher.py", line 216, in _throw data = self.client.decode(timeout=self.timeout, type=4, token_params=payload) File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 203, in decode uploaded_captcha = self.upload(captcha, **kwargs) File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 482, in upload response = self._call('upload', data) File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 417, in _call self._call('login', self.userpwd.copy()) File "/app/bazarr/bazarr/../libs/deathbycaptcha.py", line 435, in _call raise IOError('Connection lost or timed out during API request')OSError: Connection lost or timed out during API request | a few seconds ago
聽 | Addic7ed: Solving captcha. This might take a couple of minutes, but should only happen once every so often | a few seconds ago
聽 | https://www.addic7ed.com:443 "GET /login.php HTTP/1.1" 200 None | a few seconds ago
聽 | DNS: Falling back to default DNS or IP on www.addic7ed.com | a few seconds ago
聽 | Starting new HTTPS connection (1): www.addic7ed.com:443 | a few seconds ago
聽 | Addic7ed: Logging in | a few seconds ago
聽 | Addic7ed: using random user agents | a few seconds ago
聽 | Initializing provider addic7ed | a few seconds ago
seems to be working with anti-captcha, so looks like a dbc-specific issue, whether its in the subliminal python handling or the dbc API...
I'm OK abandoning dbc for now, although slightly miffed about the 7 bucks i spent for captcha's on DBC ;) i guess the balance won't go anywhere and i can try again in the future.
I'm surprised because I've tested both DBC and Anti-Captcha and they both work for me. To be sure, I've just done the test again. You can try to delete the content of your cache directory to make nothing bad left here.
Identified same issue with a new installation. DBC isn't getting the requests. When I did my first scan after installing and configuring Bazarr (and purchasing credit for DBC), I had two captcha successfully sent to DBC. Every request since hasn't seemed to reach them at all.
I'm getting seemingly-identical errors as milquephat.
Some differences in our software. On my end:
Note: Don't know if relevant, but this PC primarily uses Python39. I don't know if Bazarr is using the contents of C:\Bazarr\WinPython or if it is respecting the environmental variables and ftype Python.File and using Python39.
C:\Users\xxx>ftype Python.File
Python.File=C:\Program Files\Python39\python.exe "%1" %*
Getting the same error as well, using DBC. Same OS/versions as vaeritas.
@vaeritas @Skamba I still can't reproduce. Can you empty your config/cache/ directory and see if it fix your issue?
Sorry that this has been so elusive.
I probably should have mentioned, but I had cleared my cache prior to my example above.
I probably should have mentioned, but I had cleared my cache prior to my example above.
Strange as I can see this in your log file:
25/11/2020 12:26:55|DEBUG |subliminal_patch.providers.subscene|Re-using old subscene cookies: ...
Also, this is self-explanatory: Connection lost or timed out during API request
I would say that either DBC is down at the time you made the request, you've been throttled for an unknown reason (shared seedbox or vpn?) or something in your network is blocking call to DBC.
Hi,
Cleared my cache, removed all providers except for addic7ed and then searched subtitles for a series with only a single missing subtitle.
That resulted in the following log.
Interestingly enough, if I go to http://api.dbcapi.me/api/status, which is a generic call to the DBC API to see server status, I get the following:
Unable to complete request. Check your account credentials, balance, and ensure you're using the API correctly.
If you're receiving this message on our API, please check in our website for Updates notices.
If this problem persists, please contact support at [email protected].We appreciate your patience and understanding!
So for some reason DBC has (temporarily?) blacklisted me - this specific API call has no arguments.
In the meantime, I'm using anti-captcha which is working fine.
Here's the output I get from this API call: status=0&todays_accuracy=0.901325&solved_in=16&is_service_overloaded=0
@vaeritas can you test it on your side?
API call returns status=0&todays_accuracy=0.901852&solved_in=16&is_service_overloaded=0
Set Addic7ed as only provider, set anti-captcha to DBC, stopped bazarr service, cleared ~\ProgramData\Bazarr\cache, started bazzar service, tried to grab one sub from Wanted tab.
Looks good in log.
Getting a good response from DBC and Addic7ed now. Bit annoying because I did end up buying Anti-Captcha too.
Other applications that called on DBC were working at the time I posted the previous log, but I did not think to check API call return at that time.
Bit weird because this was a new account (and my first with them). I had a total of two (manually-started) solves with them, then it just didn't work for a few days, apparently. Maybe some kind of delay in letting me use the API after account creation?
API call returns
status=0&todays_accuracy=0.901852&solved_in=16&is_service_overloaded=0Set Addic7ed as only provider, set anti-captcha to DBC, stopped bazarr service, cleared ~\ProgramData\Bazarr\cache, started bazzar service, tried to grab one sub from Wanted tab.
Looks good in log.
Getting a good response from DBC and Addic7ed now. Bit annoying because I did end up buying Anti-Captcha too.
Other applications that called on DBC were working at the time I posted the previous log, but I did not think to check API call return at that time.
Bit weird because this was a new account (and my first with them). I had a total of two (manually-started) solves with them, then it just didn't work for a few days, apparently. Maybe some kind of delay in letting me use the API after account creation?
No idea, BTW I use anti-captcha myself as it is more stable.
Can I close this one and you'll reopen it if you face the issue again?
Your call, mate; I didn't open the issue, but I'd consider it resolved (for me).
As this was milquephat's first submitted issue, I'm wondering if we both had new DBC accounts and that has something to do with it. I've also switched all my networking equipment and got a new IP etc since my last attempt (unrelated) so again, maybe some kind of blacklist or port forwarding issue. I'd be interested in knowing the age of Skamba's DBC account.
Couldn't find anything in the API documentation to suggest a timeout period.
Either way, reckon this was or is a problem or restriction on DBC's end for sure.
@Skamba @milquephat anything to add to help confirm our conclusions?
My DBC account is also quite fresh. I wouldn't be surprised if new DBC accounts trip some kind of anti-abuse system too easily.
No news from OP. I close this one as fixed.
Most helpful comment
My DBC account is also quite fresh. I wouldn't be surprised if new DBC accounts trip some kind of anti-abuse system too easily.