Closed Spillebulle closed 8 months ago
the actual webhook is /asr, but Bazarr appends if for you. So in your browser it would be http://address:8090/asr
Should get you past a not found at least. Is your subgen container/machine reachable by bazarr (can you ping it?). Without knowing anything about your configuration my only guess is that you have a networking issue somewhere (likely in Docker).
/asr I get "method not allowed" and yes Bazarr can ping it
Can you send a screenshot of your Whisper config in Bazarr?
On Wed, Dec 20, 2023 at 1:32 PM Spillebulle @.***> wrote:
/asr I get "method not allowed" and yes Bazarr can ping it
— Reply to this email directly, view it on GitHub https://github.com/McCloudS/subgen/issues/34#issuecomment-1865100347, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJACQLFV2B4XVWCJMRTKS3YKNDLPAVCNFSM6AAAAABA5LP3LOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRVGEYDAMZUG4 . You are receiving this because you commented.Message ID: @.***>
Here are the debug logs from Bazarr
2023-12-20T20:12:39.840715757Z 2023-12-20 21:12:39,840 - urllib3.connectionpool (7fc1fa183b38) : DEBUG (connectionpool:228) - Starting new HTTP connection (5): 192.168.0.2:8090
2023-12-20T20:12:44.842708899Z 2023-12-20 21:12:44,842 - retry.api (7fc1fa183b38) : WARNING (api:40) - ('Connection aborted.', TimeoutError('timed out')), retrying in 5 seconds...
2023-12-20T20:12:49.963162709Z 2023-12-20 21:12:49,962 - urllib3.connectionpool (7fc1fa183b38) : DEBUG (connectionpool:228) - Starting new HTTP connection (6): 192.168.0.2:8090
2023-12-20T20:12:54.986118606Z 2023-12-20 21:12:54,975 - subliminal_patch.core (7fc1fa183b38) : ERROR (core:397) - Unexpected error in provider 'whisperai': Traceback (most recent call last):
2023-12-20T20:12:54.986243581Z File "/app/bazarr/bin/bazarr/../libs/urllib3/connectionpool.py", line 703, in urlopen
2023-12-20T20:12:54.986268425Z httplib_response = self._make_request(
2023-12-20T20:12:54.986281359Z ^^^^^^^^^^^^^^^^^^^
2023-12-20T20:12:54.986292975Z File "/app/bazarr/bin/bazarr/../libs/urllib3/connectionpool.py", line 398, in _make_request
2023-12-20T20:12:54.986305175Z conn.request(method, url, httplib_request_kw)
2023-12-20T20:12:54.986316735Z File "/app/bazarr/bin/bazarr/../libs/urllib3/connection.py", line 239, in request
2023-12-20T20:12:54.986328665Z super(HTTPConnection, self).request(method, url, body=body, headers=headers)
2023-12-20T20:12:54.986340165Z File "/usr/lib/python3.11/http/client.py", line 1286, in request
2023-12-20T20:12:54.986351948Z self._send_request(method, url, body, headers, encode_chunked)
2023-12-20T20:12:54.986374504Z File "/usr/lib/python3.11/http/client.py", line 1332, in _send_request
2023-12-20T20:12:54.986382049Z self.endheaders(body, encode_chunked=encode_chunked)
2023-12-20T20:12:54.986389316Z File "/usr/lib/python3.11/http/client.py", line 1281, in endheaders
2023-12-20T20:12:54.986396736Z self._send_output(message_body, encode_chunked=encode_chunked)
2023-12-20T20:12:54.986403938Z File "/usr/lib/python3.11/http/client.py", line 1080, in _send_output
2023-12-20T20:12:54.986411409Z self.send(chunk)
2023-12-20T20:12:54.986431904Z File "/usr/lib/python3.11/http/client.py", line 1002, in send
2023-12-20T20:12:54.986444864Z self.sock.sendall(data)
2023-12-20T20:12:54.986456031Z TimeoutError: timed out
2023-12-20T20:12:54.986467201Z
2023-12-20T20:12:54.986478011Z During handling of the above exception, another exception occurred:
2023-12-20T20:12:54.986489197Z
2023-12-20T20:12:54.986500137Z Traceback (most recent call last):
2023-12-20T20:12:54.986511194Z File "/app/bazarr/bin/bazarr/../libs/requests/adapters.py", line 489, in send
2023-12-20T20:12:54.986572623Z resp = conn.urlopen(
2023-12-20T20:12:54.986583360Z ^^^^^^^^^^^^^
2023-12-20T20:12:54.986595261Z File "/app/bazarr/bin/bazarr/../libs/urllib3/connectionpool.py", line 787, in urlopen
2023-12-20T20:12:54.986631620Z retries = retries.increment(
2023-12-20T20:12:54.986652960Z ^^^^^^^^^^^^^^^^^^
2023-12-20T20:12:54.986673700Z File "/app/bazarr/bin/bazarr/../libs/urllib3/util/retry.py", line 550, in increment
2023-12-20T20:12:54.986686736Z raise six.reraise(type(error), error, _stacktrace)
2023-12-20T20:12:54.986698379Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-20T20:12:54.986709736Z File "/app/bazarr/bin/bazarr/../libs/urllib3/packages/six.py", line 769, in reraise
2023-12-20T20:12:54.986721746Z raise value.with_traceback(tb)
2023-12-20T20:12:54.986745752Z File "/app/bazarr/bin/bazarr/../libs/urllib3/connectionpool.py", line 703, in urlopen
2023-12-20T20:12:54.986753668Z httplib_response = self._make_request(
2023-12-20T20:12:54.986760849Z ^^^^^^^^^^^^^^^^^^^
2023-12-20T20:12:54.986767856Z File "/app/bazarr/bin/bazarr/../libs/urllib3/connectionpool.py", line 398, in _make_request
2023-12-20T20:12:54.986775498Z conn.request(method, url, httplib_request_kw)
2023-12-20T20:12:54.986782435Z File "/app/bazarr/bin/bazarr/../libs/urllib3/connection.py", line 239, in request
2023-12-20T20:12:54.986806772Z super(HTTPConnection, self).request(method, url, body=body, headers=headers)
2023-12-20T20:12:54.986818772Z File "/usr/lib/python3.11/http/client.py", line 1286, in request
2023-12-20T20:12:54.986830369Z self._send_request(method, url, body, headers, encode_chunked)
2023-12-20T20:12:54.986841565Z File "/usr/lib/python3.11/http/client.py", line 1332, in _send_request
2023-12-20T20:12:54.986852792Z self.endheaders(body, encode_chunked=encode_chunked)
2023-12-20T20:12:54.986864225Z File "/usr/lib/python3.11/http/client.py", line 1281, in endheaders
2023-12-20T20:12:54.986885351Z self._send_output(message_body, encode_chunked=encode_chunked)
2023-12-20T20:12:54.986892671Z File "/usr/lib/python3.11/http/client.py", line 1080, in _send_output
2023-12-20T20:12:54.986899806Z self.send(chunk)
2023-12-20T20:12:54.986906676Z File "/usr/lib/python3.11/http/client.py", line 1002, in send
2023-12-20T20:12:54.986913758Z self.sock.sendall(data)
2023-12-20T20:12:54.986920659Z urllib3.exceptions.ProtocolError: ('Connection aborted.', TimeoutError('timed out'))
2023-12-20T20:12:54.986928006Z
2023-12-20T20:12:54.986952618Z During handling of the above exception, another exception occurred:
2023-12-20T20:12:54.986964061Z
2023-12-20T20:12:54.986974558Z Traceback (most recent call last):
2023-12-20T20:12:54.987002861Z File "/app/bazarr/bin/bazarr/../libs/subliminal_patch/core.py", line 366, in list_subtitles_provider
2023-12-20T20:12:54.987015721Z results = self[provider].list_subtitles(video, to_request)
2023-12-20T20:12:54.987027314Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-20T20:12:54.987038411Z File "/app/bazarr/bin/bazarr/../libs/subliminal_patch/providers/whisperai.py", line 281, in list_subtitles
2023-12-20T20:12:54.987060631Z subtitles = [self.query(l, video) for l in languages]
2023-12-20T20:12:54.987068090Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-20T20:12:54.987075088Z File "/app/bazarr/bin/bazarr/../libs/subliminal_patch/providers/whisperai.py", line 281, in
Just pulled the newest Docker from Bazarr and it's still working, so it's not a subgen issue outright.
Recommend checking that subgen is accessible to Bazarr on 192.168.0.2:8090.
The fact that your logs don't even show a valid (or invalid) response back from subgen and it just times out likely points to this being a network configuration issue.
Will likely close in the next 24 hours as this doesn’t appear to be a subgen issue.
Yeah, seems like the issue is somewhere else. I can't get it to work with this one either with Bazarr and noone from their team is responding
Also works fine with plex webhooks
I'd just confirm that your subgen and bazarr are in the same docker network (assuming you're running docker). Also make sure you're using the correct docker host address (again, assuming your docker host is 192.168.0.2, so both subgen and bazarr are at 192.168.0.2). You could also try using the internal subgen docker address if they are on the same docker network configuration.
If plex webhooks works, your subgen and plex network configuration are good. Kind of implies that your bazarr is different.
Bazarr and Subgen are on different physical machines. 192.168.0.4 is Bazarr and 192.168.0.2 is Subgen. They are on the same physical network and the connections are bridged so should work fine. Do they need to be on the same host?
They don't, it just simplifies troubleshooting. What does your docker configuration look like for subgen?
I just updated the script to return some info if you try to GET from a webbrowser or wget. If you update it, you can try something like below inside your bazarr to at least try to chase network stuff.
Image: mccloud/subgen:cuda Ports: TCP/ 8090:8090 GPUS: all ENVs: in picture Network: Bridge Volumes: /var/lib/.../Subgen-packages : /usr/local/lib/python3.10/dist-packages /var/lib/.../Subgen-data : /subgen
If you didn't manually place subgen.py into your /var/lib/.../Subgen-data : /subgen volume, then it could be outright failing to start the script at this time. If your container starting correctly/logs showing uvicorn started? /var/lib/.../Subgen-data : /subgen volume isn't recommended unless you're doing dev work, you can remove it and re-pull the image.
Works like a charm with plex webhooks so there is no issue with generation it seems
Removed the /subgen volume and repulled. No change to startup messages
wget from inside Bazarr responds
Config in Bazarr:
Click on "Search" on a movie in Bazarr and get this in the Bazarr logs:
That is odd. Looks like you checked everything I would have. Sorry it isn’t working. Seems odd plex webhooks work, but not bazarr. Maybe check that you don’t have an errant space at the beginning or end of the text entries in the bazarr whisper config (I had that issue a bit ago).
Really appreciate the help. I am trying to get help from the Bazarr guys and will continue to try, but they are stuck in a wild goose chase claiming its the timeout "7200" sec even though it times out on first contact after 20 sec
Finally got a response from them. They say calls to /detect-language is taking too long. 5 sec timeout
It is an issue in Bazarr. If you have a slow CPU that takes longer than 5 sec to respond it just doesn't wait
Hi, I set the container up and I get to the "Not found" page if I open port 8090 in the webbrowser.
But in Bazarr I get this error in the logs when I try to use it as a provider:
2023-12-20T20:08:25.963304814Z 2023-12-20 21:08:25,962 - retry.api (7fc1fa395b38) : WARNING (api:40) - ('Connection aborted.', TimeoutError('timed out')), retrying in 5 seconds... 2023-12-20T20:08:36.145970006Z 2023-12-20 21:08:36,145 - retry.api (7fc1fa395b38) : WARNING (api:40) - ('Connection aborted.', TimeoutError('timed out')), retrying in 5 seconds... 2023-12-20T20:08:46.360092257Z 2023-12-20 21:08:46,359 - root (7fc1fa395b38) : INFO (get_providers:366) - Throttling whisperai for 24 hours, until 23/12/21 21:08, because of: ConnectionError. Exception info: "'('Connection aborted.', TimeoutError('timed out'))' ~ whisperai.py@233"