McCloudS / subgen

Autogenerate subtitles using OpenAI Whisper Model via Jellyfin, Plex, Emby, Tautulli, or Bazarr
MIT License
453 stars 45 forks source link

Is there a way to monitor progress #58

Closed sdspieg closed 4 months ago

sdspieg commented 4 months ago

I'm running the docker image, and it does seem to work: when I start playing sthg on my Plex, I see messages appear in my docker log. E.g.

2024-03-11 18:57:33 INFO:     172.21.0.1:52488 - "POST /plex HTTP/1.1" 200 OK
2024-03-11 19:20:15 2024-03-11 18:20:15,616 DEBUG: Raw response: {"event":"media.play","user":true,"owner":true,"Account":{"id":12802,"thumb":"https://plex.tv/users/0a5e655b223f4ef9/avatar?c=1710124402","title":"***************"},"Server":{"title":"***************************-Office","uuid":"******************"},"Player":{"local":true,"publicAddress":"*********","title":"Chrome","uuid":"******************************},"Metadata":{"librarySectionType":"show","ratingKey":"6861","key":"/library/metadata/6861","parentRatingKey":"6807","grandparentRatingKey":"5381","guid":"local://6861","parentGuid":"plex://season/65df7ca15cef0dbfa3d335ba","grandparentGuid":"plex://show/5d9c0852705e7a001e6d8f1e","grandparentSlug":"seaside-hotel-2013","type":"episode","title":"Episode 2","grandparentKey":"/library/metadata/5381","parentKey":"/library/metadata/6807","librarySectionTitle":"TV Shows","librarySectionID":6,"librarySectionKey":"/library/sections/6","grandparentTitle":"Seaside Hotel","parentTitle":"Season 10","contentRating":"TV-14","summary":"","index":2,"parentIndex":10,"viewOffset":2003000,"lastViewedAt":1710181215,"year":2013,"thumb":"/library/metadata/6861/thumb/1710171669","art":"/library/metadata/5381/art/1709692391","grandparentThumb":"/library/metadata/5381/thumb/1709692391","grandparentArt":"/library/metadata/5381/art/1709692391","addedAt":1710171668,"updatedAt":1710171669}}

You mentioned in an issue that, when run on a CPU (and I haven't managed to get my docker container to play nice with my GPU yet), it takes about as long to transcribe a file as it does to play it. But is there a way to see what subgen is actually doing any any given time? And am I to assume that the only way to find out whether a video file is fully transcribed is the appearance of an *.srt file in the appropriate media folder where that file is located? And that it then has to be manually selected in Plex for the subtitles to appear?

Thanks!

McCloudS commented 4 months ago

Subgen will give progress if it’s doing something. Do you have more log info? It received your hook correctly, but seemingly didn’t do anything with it. You can try to set debug to false to lower the amount of log info. Additionally you maybe need to look at the skipifinternalsub variable.

On Mon, Mar 11, 2024 at 12:29 PM Stephan De Spiegeleire < @.***> wrote:

I'm running the docker image, and it does seem to work: when I start playing sthg on my Plex, I see messages appear in my docker log. E.g.

2024-03-11 18:57:33 INFO: 172.21.0.1:52488 - "POST /plex HTTP/1.1" 200 OK 2024-03-11 19:20:15 2024-03-11 18:20:15,616 DEBUG: Raw response: {"event":"media.play","user":true,"owner":true,"Account":{"id":12802,"thumb":"https://plex.tv/users/0a5e655b223f4ef9/avatar?c=1710124402","title":"***************"},"Server":{"title":"***************************-Office","uuid":"******************"},"Player":{"local":true,"publicAddress":"*********","title":"Chrome","uuid":"******************************},"Metadata":{"librarySectionType":"show","ratingKey":"6861","key":"/library/metadata/6861","parentRatingKey":"6807","grandparentRatingKey":"5381","guid":"local://6861","parentGuid":"plex://season/65df7ca15cef0dbfa3d335ba","grandparentGuid":"plex://show/5d9c0852705e7a001e6d8f1e","grandparentSlug":"seaside-hotel-2013","type":"episode","title":"Episode 2","grandparentKey":"/library/metadata/5381","parentKey":"/library/metadata/6807","librarySectionTitle":"TV Shows","librarySectionID":6,"librarySectionKey":"/library/sections/6","grandparentTitle":"Seaside Hotel","parentTitle":"Season 10","contentRating":"TV-14","summary":"","index":2,"parentIndex":10,"viewOffset":2003000,"lastViewedAt":1710181215,"year":2013,"thumb":"/library/metadata/6861/thumb/1710171669","art":"/library/metadata/5381/art/1709692391","grandparentThumb":"/library/metadata/5381/thumb/1709692391","grandparentArt":"/library/metadata/5381/art/1709692391","addedAt":1710171668,"updatedAt":1710171669}}

You mentioned in an issue that, when run on a CPU (and I haven't managed to get my docker container to play nice with my GPU yet), it takes about as long to transcribe a file as it does to play it. But is there a way to see what subgen is actually doing any any given time? Thanks!

— Reply to this email directly, view it on GitHub https://github.com/McCloudS/subgen/issues/58, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJACQIFFIOLPLOH6I2GBSDYXXZWRAVCNFSM6AAAAABEQ2VCW6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3TSOJRHEYDAMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

McCloudS commented 4 months ago

Also, I assume you have PROCMEDIAONPLAY set to true? You’ll see a huge cpu ramp when it’s running.

sdspieg commented 4 months ago

Thanks for that quick response! I THINK I now have the GPU properly installed.

(base) root@StephanOffice:/mnt/c/Plex/subgen/subgen# nvidia-smi
Mon Mar 11 19:58:39 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.54.14              Driver Version: 551.76         CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 4090        On  |   00000000:08:00.0  On |                  Off |
|  0%   52C    P5             50W /  450W |    1245MiB /  24564MiB |      2%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A        39      G   /Xwayland                                   N/A      |
|    0   N/A  N/A        42      G   /Xwayland                                   N/A      |
|    0   N/A  N/A       479      G   /Xwayland                                   N/A      |
+-----------------------------------------------------------------------------------------+

And yes, I have more log info, but it's pretty much always the same. Here's the beginning - maybe it will tell you sthg more

(base) root@StephanOffice:/mnt/c/Plex/subgen/subgen# docker-compose up --build
Recreating subgen ... done
Attaching to subgen
subgen    |
subgen    | ==========
subgen    | == CUDA ==
subgen    | ==========
subgen    |
subgen    | CUDA Version 12.2.2
subgen    |
subgen    | Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
subgen    |
subgen    | This container image and its contents are governed by the NVIDIA Deep Learning Container License.
subgen    | By pulling and using the container, you accept the terms and conditions of this license:
subgen    | https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
subgen    |
subgen    | A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
subgen    |
subgen    | Environment variable UPDATE is not set or set to False, skipping download.
subgen    | 2024-03-11 19:06:25,716 INFO: Subgen v2024.3.10.207
subgen    | 2024-03-11 19:06:25,716 INFO: Starting Subgen with listening webhooks!
subgen    | 2024-03-11 19:06:25,716 INFO: Transcriptions are limited to running 2 at a time
subgen    | 2024-03-11 19:06:25,716 INFO: Running 4 threads per transcription
subgen    | 2024-03-11 19:06:25,716 INFO: Using cpu to encode
subgen    | 2024-03-11 19:06:25,716 INFO: Using faster-whisper
subgen    | INFO:     Will watch for changes in these directories: ['/subgen']
subgen    | INFO:     Uvicorn running on http://0.0.0.0:9000 (Press CTRL+C to quit)
subgen    | INFO:     Started reloader process [1] using StatReload
subgen    | INFO:     Started server process [44]
subgen    | INFO:     Waiting for application startup.
subgen    | INFO:     Application startup complete.
subgen    | 2024-03-11 19:07:12,111 DEBUG: Raw response: {"event":"media.pause","user":true,"owner":true,"Account":{"id":12802,"thumb":"https://plex.tv/users/0a5e655b223f4ef9/avatar?c=1710176176","title":"sdspieg"},"Server":{"title":"Stephan-Office","uuid":"ca92d4d24ae4e7965405ccc64b3a709e139704d3"},"Player":{"local":true,"publicAddress":"84.26.64.202","title":"Chrome","uuid":"k3g1d68qkuabfkd8gqe9f9xi"},"Metadata":{"librarySectionType":"show","ratingKey":"6861","key":"/library/metadata/6861","parentRatingKey":"6807","grandparentRatingKey":"5381","guid":"local://6861","parentGuid":"plex://season/65df7ca15cef0dbfa3d335ba","grandparentGuid":"plex://show/5d9c0852705e7a001e6d8f1e","grandparentSlug":"seaside-hotel-2013","type":"episode","title":"Episode 2","grandparentKey":"/library/metadata/5381","parentKey":"/library/metadata/6807","librarySectionTitle":"TV Shows","librarySectionID":6,"librarySectionKey":"/library/sections/6","grandparentTitle":"Seaside Hotel","parentTitle":"Season 10","contentRating":"TV-14","summary":"","index":2,"parentIndex":10,"viewCount":1,"lastViewedAt":1710182015,"year":2013,"thumb":"/library/metadata/6861/thumb/1710171669","art":"/library/metadata/5381/art/1709692391","grandparentThumb":"/library/metadata/5381/thumb/1709692391","grandparentArt":"/library/metadata/5381/art/1709692391","addedAt":1710171668,"updatedAt":1710171669}}
subgen    | 2024-03-11 19:07:12,111 DEBUG: Plex event detected is: media.pause. 

So it seems to detect that I play or pause or resume sthg in Plex, but it doesn't kick in to gear. And my GPU stays pretty much unused. Can you please explain why getting less log info would be better for debugging ? I will now play with the parameters a bit, so far I didn't. This is what I had in my docker-compose.yml

version: '3.8'
services:
  subgen:
    container_name: subgen
    tty: true
    image: mccloud/subgen
    deploy:
      resources:
        reservations:
          devices:
          - capabilities: [gpu]
    environment:
      - "NVIDIA_VISIBLE_DEVICES=all"
      - "WHISPER_MODEL=medium"
      - "WHISPER_THREADS=4"
      - "PROCADDEDMEDIA=True"
      - "PROCMEDIAONPLAY=False"
      - "NAMESUBLANG=aa"
      - "SKIPIFINTERNALSUBLANG=eng"
      - "PLEXTOKEN=plextoken"
      - "PLEXSERVER=http://plexserver:32400"
      - "JELLYFINTOKEN=token here"
      - "JELLYFINSERVER=http://jellyfin:8096"
      - "WEBHOOKPORT=9000"
      - "CONCURRENT_TRANSCRIPTIONS=2"
      - "WORD_LEVEL_HIGHLIGHT=False"
      - "DEBUG=True"
      - "USE_PATH_MAPPING=False"
      - "PATH_MAPPING_FROM=/tv"
      - "PATH_MAPPING_TO=/Volumes/TV"
      - "TRANSCRIBE_DEVICE=cpu"
      - "CLEAR_VRAM_ON_COMPLETE=True"
      - "HF_TRANSFORMERS=False"
      - "HF_BATCH_SIZE=24"
      - "MODEL_PATH=./models"
      - "UPDATE=False"
      - "APPEND=False"
    volumes:
      - ${TV}:/tv
      - ${MOVIES}:/movies
      - ${APPDATA}/models:/subgen/models
    ports:
      - "9000:9000"
McCloudS commented 4 months ago

Set PROCMEDIAONPLAY to True if you want it to kick off when you play a media file in Plex, otherwise it'll sit and do nothing until something gets added to your library (PROCADDEDMEDIA=True).

On Mon, Mar 11, 2024 at 2:34 PM Stephan De Spiegeleire < @.***> wrote:

Thanks for that quick response! I THINK I now have the GPU properly installed.

(base) @.***:/mnt/c/Plex/subgen/subgen# nvidia-smi Mon Mar 11 19:58:39 2024 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 550.54.14 Driver Version: 551.76 CUDA Version: 12.4 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce RTX 4090 On | 00000000:08:00.0 On | Off | | 0% 52C P5 50W / 450W | 1245MiB / 24564MiB | 2% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | 0 N/A N/A 39 G /Xwayland N/A | | 0 N/A N/A 42 G /Xwayland N/A | | 0 N/A N/A 479 G /Xwayland N/A | +-----------------------------------------------------------------------------------------+

And yes, I have more log info, but it's pretty much always the same. Here's the beginning - maybe it will tell you sthg more

(base) @.***:/mnt/c/Plex/subgen/subgen# docker-compose up --build Recreating subgen ... done Attaching to subgen subgen | subgen | ========== subgen | == CUDA == subgen | ========== subgen | subgen | CUDA Version 12.2.2 subgen | subgen | Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. subgen | subgen | This container image and its contents are governed by the NVIDIA Deep Learning Container License. subgen | By pulling and using the container, you accept the terms and conditions of this license: subgen | https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license subgen | subgen | A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience. subgen | subgen | Environment variable UPDATE is not set or set to False, skipping download. subgen | 2024-03-11 19:06:25,716 INFO: Subgen v2024.3.10.207 subgen | 2024-03-11 19:06:25,716 INFO: Starting Subgen with listening webhooks! subgen | 2024-03-11 19:06:25,716 INFO: Transcriptions are limited to running 2 at a time subgen | 2024-03-11 19:06:25,716 INFO: Running 4 threads per transcription subgen | 2024-03-11 19:06:25,716 INFO: Using cpu to encode subgen | 2024-03-11 19:06:25,716 INFO: Using faster-whisper subgen | INFO: Will watch for changes in these directories: ['/subgen'] subgen | INFO: Uvicorn running on http://0.0.0.0:9000 (Press CTRL+C to quit) subgen | INFO: Started reloader process [1] using StatReload subgen | INFO: Started server process [44] subgen | INFO: Waiting for application startup. subgen | INFO: Application startup complete. subgen | 2024-03-11 19:07:12,111 DEBUG: Raw response: {"event":"media.pause","user":true,"owner":true,"Account":{"id":12802,"thumb":"https://plex.tv/users/0a5e655b223f4ef9/avatar?c=1710176176","title":"sdspieg"},"Server":{"title":"Stephan-Office","uuid":"ca92d4d24ae4e7965405ccc64b3a709e139704d3"},"Player":{"local":true,"publicAddress":"84.26.64.202","title":"Chrome","uuid":"k3g1d68qkuabfkd8gqe9f9xi"},"Metadata":{"librarySectionType":"show","ratingKey":"6861","key":"/library/metadata/6861","parentRatingKey":"6807","grandparentRatingKey":"5381","guid":"local://6861","parentGuid":"plex://season/65df7ca15cef0dbfa3d335ba","grandparentGuid":"plex://show/5d9c0852705e7a001e6d8f1e","grandparentSlug":"seaside-hotel-2013","type":"episode","title":"Episode 2","grandparentKey":"/library/metadata/5381","parentKey":"/library/metadata/6807","librarySectionTitle":"TV Shows","librarySectionID":6,"librarySectionKey":"/library/sections/6","grandparentTitle":"Seaside Hotel","parentTitle":"Season 10","contentRating":"TV-14","summary":"","index":2,"parentIndex":10,"viewCount":1,"lastViewedAt":1710182015,"year":2013,"thumb":"/library/metadata/6861/thumb/1710171669","art":"/library/metadata/5381/art/1709692391","grandparentThumb":"/library/metadata/5381/thumb/1709692391","grandparentArt":"/library/metadata/5381/art/1709692391","addedAt":1710171668,"updatedAt":1710171669}} subgen | 2024-03-11 19:07:12,111 DEBUG: Plex event detected is: media.pause. So it seems to detect that I play or pause or resume sthg in Plex, but it doesn't kick in to gear. And my GPU stays pretty much unused. Can you please explain why getting less log info would be better for debugging ? I will now play with the parameters a bit, so far I didn't. This is what I had in my docker-compose.yml

version: '3.8' services: subgen: container_name: subgen tty: true image: mccloud/subgen deploy: resources: reservations: devices:

  • capabilities: [gpu] environment:
  • "NVIDIA_VISIBLE_DEVICES=all"
  • "WHISPER_MODEL=medium"
  • "WHISPER_THREADS=4"
  • "PROCADDEDMEDIA=True"
  • "PROCMEDIAONPLAY=False"
  • "NAMESUBLANG=aa"
  • "SKIPIFINTERNALSUBLANG=eng"
  • "PLEXTOKEN=plextoken"
  • "PLEXSERVER=http://plexserver:32400"
  • "JELLYFINTOKEN=token here"
  • "JELLYFINSERVER=http://jellyfin:8096"
  • "WEBHOOKPORT=9000"
  • "CONCURRENT_TRANSCRIPTIONS=2"
  • "WORD_LEVEL_HIGHLIGHT=False"
  • "DEBUG=True"
  • "USE_PATH_MAPPING=False"
  • "PATH_MAPPING_FROM=/tv"
  • "PATH_MAPPING_TO=/Volumes/TV"
  • "TRANSCRIBE_DEVICE=cpu"
  • "CLEAR_VRAM_ON_COMPLETE=True"
  • "HF_TRANSFORMERS=False"
  • "HF_BATCH_SIZE=24"
  • "MODEL_PATH=./models"
  • "UPDATE=False"
  • "APPEND=False" volumes:
  • ${TV}:/tv
  • ${MOVIES}:/movies
  • ${APPDATA}/models:/subgen/models ports:
  • "9000:9000"

— Reply to this email directly, view it on GitHub https://github.com/McCloudS/subgen/issues/58#issuecomment-1989394029, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJACQJGJSMNUXQURFYWCADYXYIOLAVCNFSM6AAAAABEQ2VCW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBZGM4TIMBSHE . You are receiving this because you commented.Message ID: @.***>

sdspieg commented 4 months ago

Ok, so I'm now working with this

subgen    | INFO:     Started server process [1]
subgen    | INFO:     Waiting for application startup.
subgen    | INFO:     Application startup complete.
subgen    | INFO:     Uvicorn running on http://0.0.0.0:9000 (Press CTRL+C to quit)
subgen    | INFO:     172.21.0.1:60026 - "POST /plex HTTP/1.1" 200 OK
subgen    | INFO:     172.21.0.1:60020 - "POST /plex HTTP/1.1" 500 Internal Server Error
subgen    | ERROR:    Exception in ASGI application
subgen    | Traceback (most recent call last):
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 198, in _new_conn
subgen    |     sock = connection.create_connection(
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/util/connection.py", line 60, in create_connection
subgen    |     for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
subgen    |   File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
subgen    |     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
subgen    | socket.gaierror: [Errno -3] Temporary failure in name resolution
subgen    |
subgen    | The above exception was the direct cause of the following exception:
subgen    |
subgen    | Traceback (most recent call last):
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 793, in urlopen
subgen    |     response = self._make_request(
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 496, in _make_request
subgen    |     conn.request(
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 400, in request
subgen    |     self.endheaders()
subgen    |   File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
subgen    |     self._send_output(message_body, encode_chunked=encode_chunked)
subgen    |   File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
subgen    |     self.send(msg)
subgen    |   File "/usr/lib/python3.10/http/client.py", line 976, in send
subgen    |     self.connect()
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 238, in connect
subgen    |     self.sock = self._new_conn()
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 205, in _new_conn
subgen    |     raise NameResolutionError(self.host, self, e) from e
subgen    | urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7f55a3d71b40>: Failed to resolve 'plexserver' ([Errno -3] Temporary failure in name resolution)
subgen    |
subgen    | The above exception was the direct cause of the following exception:
subgen    |
subgen    | Traceback (most recent call last):
subgen    |   File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 486, in send
subgen    |     resp = conn.urlopen(
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 847, in urlopen
subgen    |     retries = retries.increment(
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/util/retry.py", line 515, in increment
subgen    |     raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
subgen    | urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='plexserver', port=32400): Max retries exceeded with url: /library/metadata/6861 (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7f55a3d71b40>: Failed to resolve 'plexserver' ([Errno -3] Temporary failure in name resolution)"))
subgen    |
subgen    | During handling of the above exception, another exception occurred:
subgen    |
subgen    | Traceback (most recent call last):
subgen    |   File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
subgen    |     result = await app(  # type: ignore[func-returns-value]
subgen    |   File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 69, in __call__
subgen    |     return await self.app(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in __call__
subgen    |     await super().__call__(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in __call__
subgen    |     await self.middleware_stack(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in __call__
subgen    |     raise exc
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in __call__
subgen    |     await self.app(scope, receive, _send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in __call__
subgen    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
subgen    |     raise exc
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
subgen    |     await app(scope, receive, sender)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 758, in __call__
subgen    |     await self.middleware_stack(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 778, in app
subgen    |     await route.handle(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 299, in handle
subgen    |     await self.app(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 79, in app
subgen    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
subgen    |     raise exc
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
subgen    |     await app(scope, receive, sender)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 74, in app
subgen    |     response = await func(request)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 278, in app
subgen    |     raw_response = await run_endpoint_function(
subgen    |   File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 193, in run_endpoint_function
subgen    |     return await run_in_threadpool(dependant.call, **values)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 42, in run_in_threadpool
subgen    |     return await anyio.to_thread.run_sync(func, *args)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 56, in run_sync
subgen    |     return await get_async_backend().run_sync_in_worker_thread(
subgen    |   File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
subgen    |     return await future
subgen    |   File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 851, in run
subgen    |     result = context.run(func, *args)
subgen    |   File "/subgen/subgen.py", line 231, in receive_plex_webhook
subgen    |     fullpath = get_plex_file_name(plex_json['Metadata']['ratingKey'], plexserver, plextoken)
subgen    |   File "/subgen/subgen.py", line 518, in get_plex_file_name
subgen    |     response = requests.get(url, headers=headers)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 73, in get
subgen    |     return request("get", url, params=params, **kwargs)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 59, in request
subgen    |     return session.request(method=method, url=url, **kwargs)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 589, in request
subgen    |     resp = self.send(prep, **send_kwargs)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 703, in send
subgen    |     r = adapter.send(request, **kwargs)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 519, in send
subgen    |     raise ConnectionError(e, request=request)
subgen    | requests.exceptions.ConnectionError: HTTPConnectionPool(host='plexserver', port=32400): Max retries exceeded with url: /library/metadata/6861 (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7f55a3d71b40>: Failed to resolve 'plexserver' ([Errno -3] Temporary failure in name resolution)"))

But I now get another error

subgen    | INFO:root:Subgen v2024.3.10.207
subgen    | INFO:root:Starting Subgen with listening webhooks!
subgen    | INFO:root:Transcriptions are limited to running 2 at a time
subgen    | INFO:root:Running 4 threads per transcription
subgen    | INFO:root:Using cpu to encode
subgen    | INFO:root:Using faster-whisper
subgen    | INFO:     Started server process [1]
subgen    | INFO:     Waiting for application startup.
subgen    | INFO:     Application startup complete.
subgen    | INFO:     Uvicorn running on http://0.0.0.0:9000 (Press CTRL+C to quit)
subgen    | INFO:     172.21.0.1:41836 - "POST /plex HTTP/1.1" 200 OK
subgen    | INFO:     172.21.0.1:41852 - "POST /plex HTTP/1.1" 500 Internal Server Error
subgen    | ERROR:    Exception in ASGI application
subgen    | Traceback (most recent call last):
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 198, in _new_conn
subgen    |     sock = connection.create_connection(
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/util/connection.py", line 60, in create_connection
subgen    |     for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
subgen    |   File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
subgen    |     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
subgen    | socket.gaierror: [Errno -3] Temporary failure in name resolution
subgen    |
subgen    | The above exception was the direct cause of the following exception:
subgen    |
subgen    | Traceback (most recent call last):
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 793, in urlopen
subgen    |     response = self._make_request(
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 496, in _make_request
subgen    |     conn.request(
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 400, in request
subgen    |     self.endheaders()
subgen    |   File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
subgen    |     self._send_output(message_body, encode_chunked=encode_chunked)
subgen    |   File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
subgen    |     self.send(msg)
subgen    |   File "/usr/lib/python3.10/http/client.py", line 976, in send
subgen    |     self.connect()
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 238, in connect
subgen    |     self.sock = self._new_conn()
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 205, in _new_conn
subgen    |     raise NameResolutionError(self.host, self, e) from e
subgen    | urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7ff55cf5cc70>: Failed to resolve 'plexserver' ([Errno -3] Temporary failure in name resolution)
subgen    |
subgen    | The above exception was the direct cause of the following exception:
subgen    |
subgen    | Traceback (most recent call last):
subgen    |   File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 486, in send
subgen    |     resp = conn.urlopen(
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 847, in urlopen
subgen    |     retries = retries.increment(
subgen    |   File "/usr/local/lib/python3.10/dist-packages/urllib3/util/retry.py", line 515, in increment
subgen    |     raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
subgen    | urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='plexserver', port=32400): Max retries exceeded with url: /library/metadata/6861 (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7ff55cf5cc70>: Failed to resolve 'plexserver' ([Errno -3] Temporary failure in name resolution)"))
subgen    |
subgen    | During handling of the above exception, another exception occurred:
subgen    |
subgen    | Traceback (most recent call last):
subgen    |   File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
subgen    |     result = await app(  # type: ignore[func-returns-value]
subgen    |   File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 69, in __call__
subgen    |     return await self.app(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in __call__
subgen    |     await super().__call__(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in __call__
subgen    |     await self.middleware_stack(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in __call__
subgen    |     raise exc
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in __call__
subgen    |     await self.app(scope, receive, _send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in __call__
subgen    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
subgen    |     raise exc
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
subgen    |     await app(scope, receive, sender)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 758, in __call__
subgen    |     await self.middleware_stack(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 778, in app
subgen    |     await route.handle(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 299, in handle
subgen    |     await self.app(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 79, in app
subgen    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
subgen    |     raise exc
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
subgen    |     await app(scope, receive, sender)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 74, in app
subgen    |     response = await func(request)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 278, in app
subgen    |     raw_response = await run_endpoint_function(
subgen    |   File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 193, in run_endpoint_function
subgen    |     return await run_in_threadpool(dependant.call, **values)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 42, in run_in_threadpool
subgen    |     return await anyio.to_thread.run_sync(func, *args)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 56, in run_sync
subgen    |     return await get_async_backend().run_sync_in_worker_thread(
subgen    |   File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
subgen    |     return await future
subgen    |   File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 851, in run
subgen    |     result = context.run(func, *args)
subgen    |   File "/subgen/subgen.py", line 231, in receive_plex_webhook
subgen    |     fullpath = get_plex_file_name(plex_json['Metadata']['ratingKey'], plexserver, plextoken)
subgen    |   File "/subgen/subgen.py", line 518, in get_plex_file_name
subgen    |     response = requests.get(url, headers=headers)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 73, in get
subgen    |     return request("get", url, params=params, **kwargs)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 59, in request
subgen    |     return session.request(method=method, url=url, **kwargs)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 589, in request
subgen    |     resp = self.send(prep, **send_kwargs)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 703, in send
subgen    |     r = adapter.send(request, **kwargs)
subgen    |   File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 519, in send
subgen    |     raise ConnectionError(e, request=request)
subgen    | requests.exceptions.ConnectionError: HTTPConnectionPool(host='plexserver', port=32400): Max retries exceeded with url: /library/metadata/6861 (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7ff55cf5cc70>: Failed to resolve 'plexserver' ([Errno -3] Temporary failure in name resolution)"))

Am going to try a full reboot...
McCloudS commented 4 months ago

You need to update the environment variables to match your configuration, in particular right now: `- "PLEXTOKEN=plextoken"

  - "PLEXSERVER=http://plexserver:32400"`

On Mon, Mar 11, 2024 at 2:46 PM Stephan De Spiegeleire < @.***> wrote:

Ok, so I'm now working with this

subgen | INFO: Started server process [1] subgen | INFO: Waiting for application startup. subgen | INFO: Application startup complete. subgen | INFO: Uvicorn running on http://0.0.0.0:9000 (Press CTRL+C to quit) subgen | INFO: 172.21.0.1:60026 - "POST /plex HTTP/1.1" 200 OK subgen | INFO: 172.21.0.1:60020 - "POST /plex HTTP/1.1" 500 Internal Server Error subgen | ERROR: Exception in ASGI application subgen | Traceback (most recent call last): subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 198, in _new_conn subgen | sock = connection.create_connection( subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/util/connection.py", line 60, in create_connection subgen | for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): subgen | File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo subgen | for res in _socket.getaddrinfo(host, port, family, type, proto, flags): subgen | socket.gaierror: [Errno -3] Temporary failure in name resolution subgen | subgen | The above exception was the direct cause of the following exception: subgen | subgen | Traceback (most recent call last): subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 793, in urlopen subgen | response = self._make_request( subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 496, in _make_request subgen | conn.request( subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 400, in request subgen | self.endheaders() subgen | File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders subgen | self._send_output(message_body, encode_chunked=encode_chunked) subgen | File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output subgen | self.send(msg) subgen | File "/usr/lib/python3.10/http/client.py", line 976, in send subgen | self.connect() subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 238, in connect subgen | self.sock = self._new_conn() subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 205, in _new_conn subgen | raise NameResolutionError(self.host, self, e) from e subgen | urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7f55a3d71b40>: Failed to resolve 'plexserver' ([Errno -3] Temporary failure in name resolution) subgen | subgen | The above exception was the direct cause of the following exception: subgen | subgen | Traceback (most recent call last): subgen | File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 486, in send subgen | resp = conn.urlopen( subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 847, in urlopen subgen | retries = retries.increment( subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/util/retry.py", line 515, in increment subgen | raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] subgen | urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='plexserver', port=32400): Max retries exceeded with url: /library/metadata/6861 (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7f55a3d71b40>: Failed to resolve 'plexserver' ([Errno -3] Temporary failure in name resolution)")) subgen | subgen | During handling of the above exception, another exception occurred: subgen | subgen | Traceback (most recent call last): subgen | File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi subgen | result = await app( # type: ignore[func-returns-value] subgen | File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 69, in call subgen | return await self.app(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in call subgen | await super().call(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in call subgen | await self.middleware_stack(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in call subgen | raise exc subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in call subgen | await self.app(scope, receive, _send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in call subgen | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app subgen | raise exc subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app subgen | await app(scope, receive, sender) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 758, in call subgen | await self.middleware_stack(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 778, in app subgen | await route.handle(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 299, in handle subgen | await self.app(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 79, in app subgen | await wrap_app_handling_exceptions(app, request)(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app subgen | raise exc subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app subgen | await app(scope, receive, sender) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 74, in app subgen | response = await func(request) subgen | File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 278, in app subgen | raw_response = await run_endpoint_function( subgen | File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 193, in run_endpoint_function subgen | return await run_in_threadpool(dependant.call, values) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 42, in run_in_threadpool subgen | return await anyio.to_thread.run_sync(func, args) subgen | File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 56, in run_sync subgen | return await get_async_backend().run_sync_in_worker_thread( subgen | File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread subgen | return await future subgen | File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 851, in run subgen | result = context.run(func, args) subgen | File "/subgen/subgen.py", line 231, in receive_plex_webhook subgen | fullpath = get_plex_file_name(plex_json['Metadata']['ratingKey'], plexserver, plextoken) subgen | File "/subgen/subgen.py", line 518, in get_plex_file_name subgen | response = requests.get(url, headers=headers) subgen | File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 73, in get subgen | return request("get", url, params=params, kwargs) subgen | File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 59, in request subgen | return session.request(method=method, url=url, kwargs) subgen | File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 589, in request subgen | resp = self.send(prep, send_kwargs) subgen | File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 703, in send subgen | r = adapter.send(request, **kwargs) subgen | File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 519, in send subgen | raise ConnectionError(e, request=request) subgen | requests.exceptions.ConnectionError: HTTPConnectionPool(host='plexserver', port=32400): Max retries exceeded with url: /library/metadata/6861 (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7f55a3d71b40>: Failed to resolve 'plexserver' ([Errno -3] Temporary failure in name resolution)"))

But I now get another error

subgen | INFO:root:Subgen v2024.3.10.207 subgen | INFO:root:Starting Subgen with listening webhooks! subgen | INFO:root:Transcriptions are limited to running 2 at a time subgen | INFO:root:Running 4 threads per transcription subgen | INFO:root:Using cpu to encode subgen | INFO:root:Using faster-whisper subgen | INFO: Started server process [1] subgen | INFO: Waiting for application startup. subgen | INFO: Application startup complete. subgen | INFO: Uvicorn running on http://0.0.0.0:9000 (Press CTRL+C to quit) subgen | INFO: 172.21.0.1:41836 - "POST /plex HTTP/1.1" 200 OK subgen | INFO: 172.21.0.1:41852 - "POST /plex HTTP/1.1" 500 Internal Server Error subgen | ERROR: Exception in ASGI application subgen | Traceback (most recent call last): subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 198, in _new_conn subgen | sock = connection.create_connection( subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/util/connection.py", line 60, in create_connection subgen | for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): subgen | File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo subgen | for res in _socket.getaddrinfo(host, port, family, type, proto, flags): subgen | socket.gaierror: [Errno -3] Temporary failure in name resolution subgen | subgen | The above exception was the direct cause of the following exception: subgen | subgen | Traceback (most recent call last): subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 793, in urlopen subgen | response = self._make_request( subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 496, in _make_request subgen | conn.request( subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 400, in request subgen | self.endheaders() subgen | File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders subgen | self._send_output(message_body, encode_chunked=encode_chunked) subgen | File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output subgen | self.send(msg) subgen | File "/usr/lib/python3.10/http/client.py", line 976, in send subgen | self.connect() subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 238, in connect subgen | self.sock = self._new_conn() subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 205, in _new_conn subgen | raise NameResolutionError(self.host, self, e) from e subgen | urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7ff55cf5cc70>: Failed to resolve 'plexserver' ([Errno -3] Temporary failure in name resolution) subgen | subgen | The above exception was the direct cause of the following exception: subgen | subgen | Traceback (most recent call last): subgen | File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 486, in send subgen | resp = conn.urlopen( subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 847, in urlopen subgen | retries = retries.increment( subgen | File "/usr/local/lib/python3.10/dist-packages/urllib3/util/retry.py", line 515, in increment subgen | raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] subgen | urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='plexserver', port=32400): Max retries exceeded with url: /library/metadata/6861 (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7ff55cf5cc70>: Failed to resolve 'plexserver' ([Errno -3] Temporary failure in name resolution)")) subgen | subgen | During handling of the above exception, another exception occurred: subgen | subgen | Traceback (most recent call last): subgen | File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi subgen | result = await app( # type: ignore[func-returns-value] subgen | File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 69, in call subgen | return await self.app(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in call subgen | await super().call(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in call subgen | await self.middleware_stack(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in call subgen | raise exc subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in call subgen | await self.app(scope, receive, _send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in call subgen | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app subgen | raise exc subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app subgen | await app(scope, receive, sender) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 758, in call subgen | await self.middleware_stack(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 778, in app subgen | await route.handle(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 299, in handle subgen | await self.app(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 79, in app subgen | await wrap_app_handling_exceptions(app, request)(scope, receive, send) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app subgen | raise exc subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app subgen | await app(scope, receive, sender) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 74, in app subgen | response = await func(request) subgen | File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 278, in app subgen | raw_response = await run_endpoint_function( subgen | File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 193, in run_endpoint_function subgen | return await run_in_threadpool(dependant.call, values) subgen | File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 42, in run_in_threadpool subgen | return await anyio.to_thread.run_sync(func, args) subgen | File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 56, in run_sync subgen | return await get_async_backend().run_sync_in_worker_thread( subgen | File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread subgen | return await future subgen | File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 851, in run subgen | result = context.run(func, args) subgen | File "/subgen/subgen.py", line 231, in receive_plex_webhook subgen | fullpath = get_plex_file_name(plex_json['Metadata']['ratingKey'], plexserver, plextoken) subgen | File "/subgen/subgen.py", line 518, in get_plex_file_name subgen | response = requests.get(url, headers=headers) subgen | File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 73, in get subgen | return request("get", url, params=params, kwargs) subgen | File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 59, in request subgen | return session.request(method=method, url=url, kwargs) subgen | File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 589, in request subgen | resp = self.send(prep, send_kwargs) subgen | File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 703, in send subgen | r = adapter.send(request, **kwargs) subgen | File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 519, in send subgen | raise ConnectionError(e, request=request) subgen | requests.exceptions.ConnectionError: HTTPConnectionPool(host='plexserver', port=32400): Max retries exceeded with url: /library/metadata/6861 (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7ff55cf5cc70>: Failed to resolve 'plexserver' ([Errno -3] Temporary failure in name resolution)"))

Am going to try a full reboot...

— Reply to this email directly, view it on GitHub https://github.com/McCloudS/subgen/issues/58#issuecomment-1989413311, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJACQMIQT6MLN5ATEVE5ULYXYJYPAVCNFSM6AAAAABEQ2VCW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBZGQYTGMZRGE . You are receiving this because you commented.Message ID: @.***>

sdspieg commented 4 months ago

Hmmm. I now have the Plex token and it connects again. But it still doesn't transcribe. Just a question - I used

${APPDATA}/subgen/models:/subgen/models

But when I look there, I dodn't see any models... Could that be the reason?

McCloudS commented 4 months ago

Do you have the APPDATA variable defined in your docker environment? If not, you'll have to update the paths to your particular system.

On Mon, Mar 11, 2024 at 3:29 PM Stephan De Spiegeleire < @.***> wrote:

Hmmm. I now have the Plex token and it connects again. But it still doesn't transcribe. Just a question - I used

${APPDATA}/subgen/models:/subgen/models

But when I look there, I dodn't see any models... Could that be the reason?

— Reply to this email directly, view it on GitHub https://github.com/McCloudS/subgen/issues/58#issuecomment-1989477885, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJACQPBIX6MCR4DAEWLJWDYXYO2PAVCNFSM6AAAAABEQ2VCW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBZGQ3TOOBYGU . You are receiving this because you commented.Message ID: @.***>

McCloudS commented 4 months ago

Or you can just delete the path and let everything live inside the container. Similarly, you'll have to update - ${TV}:/tv

  - ${MOVIES}:/movies to match your plex configuration.

On Mon, Mar 11, 2024 at 3:41 PM Scott McCloud @.***> wrote:

Do you have the APPDATA variable defined in your docker environment? If not, you'll have to update the paths to your particular system.

On Mon, Mar 11, 2024 at 3:29 PM Stephan De Spiegeleire < @.***> wrote:

Hmmm. I now have the Plex token and it connects again. But it still doesn't transcribe. Just a question - I used

${APPDATA}/subgen/models:/subgen/models

But when I look there, I dodn't see any models... Could that be the reason?

— Reply to this email directly, view it on GitHub https://github.com/McCloudS/subgen/issues/58#issuecomment-1989477885, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJACQPBIX6MCR4DAEWLJWDYXYO2PAVCNFSM6AAAAABEQ2VCW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBZGQ3TOOBYGU . You are receiving this because you commented.Message ID: @.***>

sdspieg commented 4 months ago

Ok - that'll have to be for tomorrow. I have to get some real work done first :). Still - your speedy and useful replies are indeed tremendous! Thanks much.

sdspieg commented 4 months ago

I have now deleted the docker container and have installed everything just in Windows. That did seem to work initially, but it then threw another error

INFO:     127.0.0.1:50936 - "POST /plex HTTP/1.1" 200 OK
2024-03-12 21:40:44,182 DEBUG: Raw response: {"event":"media.play","user":true,"owner":true,"Account":{"id":12802,"thumb":"https://plex.tv/users/*********/avatar?c=1710189625","title":"sdspieg"},"Server":{"title":"Stephan-Office","uuid":"****************"},"Player":{"local":true,"publicAddress":"143.215.16.45","title":"Chrome","uuid":"****************************"},"Metadata":{"librarySectionType":"show","ratingKey":"6808","key":"/library/metadata/6808","parentRatingKey":"6807","grandparentRatingKey":"5381","guid":"plex://episode/65df7ca25cef0dbfa3d335d4","parentGuid":"plex://season/65df7ca15cef0dbfa3d335ba","grandparentGuid":"plex://show/5d9c0852705e7a001e6d8f1e","grandparentSlug":"seaside-hotel-2013","type":"episode","title":"Hjemve","grandparentKey":"/library/metadata/5381","parentKey":"/library/metadata/6807","librarySectionTitle":"TV Shows","librarySectionID":6,"librarySectionKey":"/library/sections/6","grandparentTitle":"Seaside Hotel","parentTitle":"Season 10","originalTitle":"Seaside Hotel (2013)","contentRating":"TV-14","summary":"Summer 1946. Guests and employees are back at the hotel. Madsen meets a wealthy Danish-American and immediately sees the chance for profit. Weyse is lured into a trap by the theater, but his wife has no time to help him. And Amanda misses her beloved Uwe, whom she has not been allowed to see for a year.","index":1,"parentIndex":10,"viewOffset":404000,"skipCount":1,"lastViewedAt":1710276030,"year":2024,"thumb":"/library/metadata/6808/thumb/1709692390","art":"/library/metadata/5381/art/1709692391","grandparentThumb":"/library/metadata/5381/thumb/1709692391","grandparentArt":"/library/metadata/5381/art/1709692391","duration":2940000,"originallyAvailableAt":"2024-03-03","addedAt":1709520172,"updatedAt":1709692390,"Guid":[{"id":"tmdb://5177494"}],"Role":[{"id":37856,"filter":"actor=37856","tag":"Morten Hemmingsen","tagKey":"5d7768462e80df001ebe0708","role":"Morten Enevoldsen","thumb":"https://metadata-static.plex.tv/4/people/42b460ef9561483de83032624444bbec.jpg"},{"id":37857,"filter":"actor=37857","tag":"Rosalinde Mynster","tagKey":"5d77683f5af944001f1fbfc3","role":"Stuepige Fie","thumb":"https://metadata-static.plex.tv/c/people/ca544d3866ee27fefb981c6ddb1a2cc2.jpg"},{"id":37858,"filter":"actor=37858","tag":"Anette Støvelbæk","tagKey":"5d7768262ec6b5001f6ba233","role":"Alice Frigh","thumb":"https://metadata-static.plex.tv/people/5d7768262ec6b5001f6ba233.jpg"},{"id":37859,"filter":"actor=37859","tag":"Mads Wille","tagKey":"5d77683d103a2d001f569d38","role":"Grev Ditmar","thumb":"https://metadata-static.plex.tv/6/people/6c1e9706989a1cde9cd1797d2ffd63a6.jpg"},{"id":37860,"filter":"actor=37860","tag":"Amalie Dollerup","tagKey":"5d7768a37e5fa10020bf30af","role":"Amanda Madsen","thumb":"https://metadata-static.plex.tv/5/people/5b58a9ad64cb638f2c1a0eb06d8f2ded.jpg"},{"id":37861,"filter":"actor=37861","tag":"Peter Hesse Overgaard","tagKey":"5d77682a961905001eb91f57","role":"Kontorchef Hjalmar Aurland","thumb":"https://image.tmdb.org/t/p/original/7dsQTXBEBNZyUSI6zOJDMglX7VT.jpg"},{"id":37862,"filter":"actor=37862","tag":"Cecilie Stenspil","tagKey":"5d77699896b655001fdd35f0","role":"Helene Aurland","thumb":"https://metadata-static.plex.tv/people/5d77699896b655001fdd35f0.jpg"},{"id":37863,"filter":"actor=37863","tag":"Anne Louise Hassing","tagKey":"5d7768266f4521001ea98cd0","role":"Therese Madsen","thumb":"https://metadata-static.plex.tv/people/5d7768266f4521001ea98cd0.jpg"},{"id":37864,"filter":"actor=37864","tag":"Birthe Neumann","tagKey":"5d7768255af944001f1f63f9","role":"Fru (Olga) Fjeldsø","thumb":"https://metadata-static.plex.tv/9/people/97f1920c9126ee38a58fc29a8c1a2f18.jpg"},{"id":37865,"filter":"actor=37865","tag":"Bodil Jørgensen","tagKey":"5d7768266f4521001ea98ccf","role":"Molly Andersen","thumb":"https://metadata-static.plex.tv/c/people/c65aca1709dfc1338f18a6f23190c84d.jpg"},{"id":37866,"filter":"actor=37866","tag":"Jens Jacob Tychsen","tagKey":"5d7768a2431c830024c116fa","role":"Skuespiller Edward Weyse","thumb":"https://metadata-static.plex.tv/8/people/8892d6f0fa5176981ec101d205d7ee2a.jpg"},{"id":34812,"filter":"actor=34812","tag":"Lars Ranthe","tagKey":"5d7768286f4521001ea996ef","role":"Grosserer Georg Madsen","thumb":"https://metadata-static.plex.tv/b/people/bd629f1e79e12d0184f9b96ac0b4291b.jpg"}]}}
2024-03-12 21:40:44,182 DEBUG: Plex event detected is: media.play
INFO:     127.0.0.1:50975 - "POST /plex HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connection.py", line 174, in _new_conn
    conn = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\util\connection.py", line 95, in create_connection
    raise err
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\util\connection.py", line 85, in create_connection
    sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connectionpool.py", line 714, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connectionpool.py", line 415, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connection.py", line 244, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 1286, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 1332, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 1281, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 1041, in _send_output
    self.send(msg)
  File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 979, in send
    self.connect()
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connection.py", line 205, in connect
    conn = self._new_conn()
           ^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connection.py", line 179, in _new_conn
    raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x0000012798F98590>, 'Connection to 192.168.1.111 timed out. (connect timeout=None)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\adapters.py", line 487, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connectionpool.py", line 798, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\util\retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.111', port=32400): Max retries exceeded with url: /library/metadata/6808 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x0000012798F98590>, 'Connection to 192.168.1.111 timed out. (connect timeout=None)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 69, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\fastapi\applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
    raise exc
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 79, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 74, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\fastapi\routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\fastapi\routing.py", line 193, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\concurrency.py", line 42, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\anyio\_backends\_asyncio.py", line 2144, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\anyio\_backends\_asyncio.py", line 851, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Plex\subgen\subgen\subgen\subgen.py", line 231, in receive_plex_webhook
    fullpath = get_plex_file_name(plex_json['Metadata']['ratingKey'], plexserver, plextoken)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Plex\subgen\subgen\subgen\subgen.py", line 518, in get_plex_file_name
    response = requests.get(url, headers=headers)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\adapters.py", line 508, in send
    raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='192.168.1.111', port=32400): Max retries exceeded with url: /library/metadata/6808 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x0000012798F98590>, 'Connection to 192.168.1.111 timed out. (connect timeout=None)'))
McCloudS commented 4 months ago

My only guess is that 192.168.1.111 is not the IP address of your plex server. It's timing out because it can't reach the server.

On Tue, Mar 12, 2024 at 2:47 PM Stephan De Spiegeleire < @.***> wrote:

I have now deleted the docker container and have installed everything just in Windows. That did seem to work initially, but it then threw another (different) error

INFO: 127.0.0.1:50936 - "POST /plex HTTP/1.1" 200 OK 2024-03-12 21:40:44,182 DEBUG: Raw response: {"event":"media.play","user":true,"owner":true,"Account":{"id":12802,"thumb":"https://plex.tv/users/*********/avatar?c=1710189625","title":"sdspieg"},"Server":{"title":"Stephan-Office","uuid":"****************"},"Player":{"local":true,"publicAddress":"143.215.16.45","title":"Chrome","uuid":"****************************"},"Metadata":{"librarySectionType":"show","ratingKey":"6808","key":"/library/metadata/6808","parentRatingKey":"6807","grandparentRatingKey":"5381","guid":"plex://episode/65df7ca25cef0dbfa3d335d4","parentGuid":"plex://season/65df7ca15cef0dbfa3d335ba","grandparentGuid":"plex://show/5d9c0852705e7a001e6d8f1e","grandparentSlug":"seaside-hotel-2013","type":"episode","title":"Hjemve","grandparentKey":"/library/metadata/5381","parentKey":"/library/metadata/6807","librarySectionTitle":"TV Shows","librarySectionID":6,"librarySectionKey":"/library/sections/6","grandparentTitle":"Seaside Hotel","parentTitle":"Season 10","originalTitle":"Seaside Hotel (2013)","contentRating":"TV-14","summary":"Summer 1946. Guests and employees are back at the hotel. Madsen meets a wealthy Danish-American and immediately sees the chance for profit. Weyse is lured into a trap by the theater, but his wife has no time to help him. And Amanda misses her beloved Uwe, whom she has not been allowed to see for a year.","index":1,"parentIndex":10,"viewOffset":404000,"skipCount":1,"lastViewedAt":1710276030,"year":2024,"thumb":"/library/metadata/6808/thumb/1709692390","art":"/library/metadata/5381/art/1709692391","grandparentThumb":"/library/metadata/5381/thumb/1709692391","grandparentArt":"/library/metadata/5381/art/1709692391","duration":2940000,"originallyAvailableAt":"2024-03-03","addedAt":1709520172,"updatedAt":1709692390,"Guid":[{"id":"tmdb://5177494"}],"Role":[{"id":37856,"filter":"actor=37856","tag":"Morten Hemmingsen","tagKey":"5d7768462e80df001ebe0708","role":"Morten Enevoldsen","thumb":"https://metadata-static.plex.tv/4/people/42b460ef9561483de83032624444bbec.jpg"},{"id":37857,"filter":"actor=37857","tag":"Rosalinde Mynster","tagKey":"5d77683f5af944001f1fbfc3","role":"Stuepige Fie","thumb":"https://metadata-static.plex.tv/c/people/ca544d3866ee27fefb981c6ddb1a2cc2.jpg"},{"id":37858,"filter":"actor=37858","tag":"Anette Støvelbæk","tagKey":"5d7768262ec6b5001f6ba233","role":"Alice Frigh","thumb":"https://metadata-static.plex.tv/people/5d7768262ec6b5001f6ba233.jpg"},{"id":37859,"filter":"actor=37859","tag":"Mads Wille","tagKey":"5d77683d103a2d001f569d38","role":"Grev Ditmar","thumb":"https://metadata-static.plex.tv/6/people/6c1e9706989a1cde9cd1797d2ffd63a6.jpg"},{"id":37860,"filter":"actor=37860","tag":"Amalie Dollerup","tagKey":"5d7768a37e5fa10020bf30af","role":"Amanda Madsen","thumb":"https://metadata-static.plex.tv/5/people/5b58a9ad64cb638f2c1a0eb06d8f2ded.jpg"},{"id":37861,"filter":"actor=37861","tag":"Peter Hesse Overgaard","tagKey":"5d77682a961905001eb91f57","role":"Kontorchef Hjalmar Aurland","thumb":"https://image.tmdb.org/t/p/original/7dsQTXBEBNZyUSI6zOJDMglX7VT.jpg"},{"id":37862,"filter":"actor=37862","tag":"Cecilie Stenspil","tagKey":"5d77699896b655001fdd35f0","role":"Helene Aurland","thumb":"https://metadata-static.plex.tv/people/5d77699896b655001fdd35f0.jpg"},{"id":37863,"filter":"actor=37863","tag":"Anne Louise Hassing","tagKey":"5d7768266f4521001ea98cd0","role":"Therese Madsen","thumb":"https://metadata-static.plex.tv/people/5d7768266f4521001ea98cd0.jpg"},{"id":37864,"filter":"actor=37864","tag":"Birthe Neumann","tagKey":"5d7768255af944001f1f63f9","role":"Fru (Olga) Fjeldsø","thumb":"https://metadata-static.plex.tv/9/people/97f1920c9126ee38a58fc29a8c1a2f18.jpg"},{"id":37865,"filter":"actor=37865","tag":"Bodil Jørgensen","tagKey":"5d7768266f4521001ea98ccf","role":"Molly Andersen","thumb":"https://metadata-static.plex.tv/c/people/c65aca1709dfc1338f18a6f23190c84d.jpg"},{"id":37866,"filter":"actor=37866","tag":"Jens Jacob Tychsen","tagKey":"5d7768a2431c830024c116fa","role":"Skuespiller Edward Weyse","thumb":"https://metadata-static.plex.tv/8/people/8892d6f0fa5176981ec101d205d7ee2a.jpg"},{"id":34812,"filter":"actor=34812","tag":"Lars Ranthe","tagKey":"5d7768286f4521001ea996ef","role":"Grosserer Georg Madsen","thumb":"https://metadata-static.plex.tv/b/people/bd629f1e79e12d0184f9b96ac0b4291b.jpg"}]}} 2024-03-12 21:40:44,182 DEBUG: Plex event detected is: media.play INFO: 127.0.0.1:50975 - "POST /plex HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application Traceback (most recent call last): File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connection.py", line 174, in _new_conn conn = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\util\connection.py", line 95, in create_connection raise err File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\util\connection.py", line 85, in create_connection sock.connect(sa) TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connectionpool.py", line 714, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connectionpool.py", line 415, in _make_request conn.request(method, url, **httplib_request_kw) File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 1286, in request self._send_request(method, url, body, headers, encode_chunked) File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 1332, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 1281, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 1041, in _send_output self.send(msg) File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 979, in send self.connect() File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connection.py", line 205, in connect conn = self._new_conn() ^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connection.py", line 179, in _new_conn raise ConnectTimeoutError( urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x0000012798F98590>, 'Connection to 192.168.1.111 timed out. (connect timeout=None)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\adapters.py", line 487, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connectionpool.py", line 798, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\util\retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.111', port=32400): Max retries exceeded with url: /library/metadata/6808 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x0000012798F98590>, 'Connection to 192.168.1.111 timed out. (connect timeout=None)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\sdspi\miniconda3\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 69, in call return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\fastapi\applications.py", line 1054, in call await super().call(scope, receive, send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\middleware\errors.py", line 186, in call raise exc File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\middleware\errors.py", line 164, in call await self.app(scope, receive, _send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 758, in call await self.middleware_stack(scope, receive, send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 778, in app await route.handle(scope, receive, send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 299, in handle await self.app(scope, receive, send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 79, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 74, in app response = await func(request) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\fastapi\routing.py", line 278, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\fastapi\routing.py", line 193, in run_endpoint_function return await run_in_threadpool(dependant.call, values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\concurrency.py", line 42, in run_in_threadpool return await anyio.to_thread.run_sync(func, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\anyio_backends_asyncio.py", line 2144, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\anyio_backends_asyncio.py", line 851, in run result = context.run(func, args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Plex\subgen\subgen\subgen\subgen.py", line 231, in receive_plex_webhook fullpath = get_plex_file_name(plex_json['Metadata']['ratingKey'], plexserver, plextoken) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Plex\subgen\subgen\subgen\subgen.py", line 518, in get_plex_file_name response = requests.get(url, headers=headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\api.py", line 73, in get return request("get", url, params=params, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\api.py", line 59, in request return session.request(method=method, url=url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\adapters.py", line 508, in send raise ConnectTimeout(e, request=request) requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='192.168.1.111', port=32400): Max retries exceeded with url: /library/metadata/6808 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x0000012798F98590>, 'Connection to 192.168.1.111 timed out. (connect timeout=None)'))

— Reply to this email directly, view it on GitHub https://github.com/McCloudS/subgen/issues/58#issuecomment-1992547357, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJACQMG7V2ENSXNWJ7PCMDYX5STHAVCNFSM6AAAAABEQ2VCW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJSGU2DOMZVG4 . You are receiving this because you commented.Message ID: @.***>

McCloudS commented 4 months ago

You either need to manually edit subgen.py and change the default values to yours, like plexserver = os.getenv('PLEXSERVER', 'http://192.168.1.111:32400') or set your environment variables in Windows before running the script.

On Tue, Mar 12, 2024 at 2:57 PM Scott McCloud @.***> wrote:

My only guess is that 192.168.1.111 is not the IP address of your plex server. It's timing out because it can't reach the server.

On Tue, Mar 12, 2024 at 2:47 PM Stephan De Spiegeleire < @.***> wrote:

I have now deleted the docker container and have installed everything just in Windows. That did seem to work initially, but it then threw another (different) error

INFO: 127.0.0.1:50936 - "POST /plex HTTP/1.1" 200 OK 2024-03-12 21:40:44,182 DEBUG: Raw response: {"event":"media.play","user":true,"owner":true,"Account":{"id":12802,"thumb":"https://plex.tv/users/*********/avatar?c=1710189625","title":"sdspieg"},"Server":{"title":"Stephan-Office","uuid":"****************"},"Player":{"local":true,"publicAddress":"143.215.16.45","title":"Chrome","uuid":"****************************"},"Metadata":{"librarySectionType":"show","ratingKey":"6808","key":"/library/metadata/6808","parentRatingKey":"6807","grandparentRatingKey":"5381","guid":"plex://episode/65df7ca25cef0dbfa3d335d4","parentGuid":"plex://season/65df7ca15cef0dbfa3d335ba","grandparentGuid":"plex://show/5d9c0852705e7a001e6d8f1e","grandparentSlug":"seaside-hotel-2013","type":"episode","title":"Hjemve","grandparentKey":"/library/metadata/5381","parentKey":"/library/metadata/6807","librarySectionTitle":"TV Shows","librarySectionID":6,"librarySectionKey":"/library/sections/6","grandparentTitle":"Seaside Hotel","parentTitle":"Season 10","originalTitle":"Seaside Hotel (2013)","contentRating":"TV-14","summary":"Summer 1946. Guests and employees are back at the hotel. Madsen meets a wealthy Danish-American and immediately sees the chance for profit. Weyse is lured into a trap by the theater, but his wife has no time to help him. And Amanda misses her beloved Uwe, whom she has not been allowed to see for a year.","index":1,"parentIndex":10,"viewOffset":404000,"skipCount":1,"lastViewedAt":1710276030,"year":2024,"thumb":"/library/metadata/6808/thumb/1709692390","art":"/library/metadata/5381/art/1709692391","grandparentThumb":"/library/metadata/5381/thumb/1709692391","grandparentArt":"/library/metadata/5381/art/1709692391","duration":2940000,"originallyAvailableAt":"2024-03-03","addedAt":1709520172,"updatedAt":1709692390,"Guid":[{"id":"tmdb://5177494"}],"Role":[{"id":37856,"filter":"actor=37856","tag":"Morten Hemmingsen","tagKey":"5d7768462e80df001ebe0708","role":"Morten Enevoldsen","thumb":"https://metadata-static.plex.tv/4/people/42b460ef9561483de83032624444bbec.jpg"},{"id":37857,"filter":"actor=37857","tag":"Rosalinde Mynster","tagKey":"5d77683f5af944001f1fbfc3","role":"Stuepige Fie","thumb":"https://metadata-static.plex.tv/c/people/ca544d3866ee27fefb981c6ddb1a2cc2.jpg"},{"id":37858,"filter":"actor=37858","tag":"Anette Støvelbæk","tagKey":"5d7768262ec6b5001f6ba233","role":"Alice Frigh","thumb":"https://metadata-static.plex.tv/people/5d7768262ec6b5001f6ba233.jpg"},{"id":37859,"filter":"actor=37859","tag":"Mads Wille","tagKey":"5d77683d103a2d001f569d38","role":"Grev Ditmar","thumb":"https://metadata-static.plex.tv/6/people/6c1e9706989a1cde9cd1797d2ffd63a6.jpg"},{"id":37860,"filter":"actor=37860","tag":"Amalie Dollerup","tagKey":"5d7768a37e5fa10020bf30af","role":"Amanda Madsen","thumb":"https://metadata-static.plex.tv/5/people/5b58a9ad64cb638f2c1a0eb06d8f2ded.jpg"},{"id":37861,"filter":"actor=37861","tag":"Peter Hesse Overgaard","tagKey":"5d77682a961905001eb91f57","role":"Kontorchef Hjalmar Aurland","thumb":"https://image.tmdb.org/t/p/original/7dsQTXBEBNZyUSI6zOJDMglX7VT.jpg"},{"id":37862,"filter":"actor=37862","tag":"Cecilie Stenspil","tagKey":"5d77699896b655001fdd35f0","role":"Helene Aurland","thumb":"https://metadata-static.plex.tv/people/5d77699896b655001fdd35f0.jpg"},{"id":37863,"filter":"actor=37863","tag":"Anne Louise Hassing","tagKey":"5d7768266f4521001ea98cd0","role":"Therese Madsen","thumb":"https://metadata-static.plex.tv/people/5d7768266f4521001ea98cd0.jpg"},{"id":37864,"filter":"actor=37864","tag":"Birthe Neumann","tagKey":"5d7768255af944001f1f63f9","role":"Fru (Olga) Fjeldsø","thumb":"https://metadata-static.plex.tv/9/people/97f1920c9126ee38a58fc29a8c1a2f18.jpg"},{"id":37865,"filter":"actor=37865","tag":"Bodil Jørgensen","tagKey":"5d7768266f4521001ea98ccf","role":"Molly Andersen","thumb":"https://metadata-static.plex.tv/c/people/c65aca1709dfc1338f18a6f23190c84d.jpg"},{"id":37866,"filter":"actor=37866","tag":"Jens Jacob Tychsen","tagKey":"5d7768a2431c830024c116fa","role":"Skuespiller Edward Weyse","thumb":"https://metadata-static.plex.tv/8/people/8892d6f0fa5176981ec101d205d7ee2a.jpg"},{"id":34812,"filter":"actor=34812","tag":"Lars Ranthe","tagKey":"5d7768286f4521001ea996ef","role":"Grosserer Georg Madsen","thumb":"https://metadata-static.plex.tv/b/people/bd629f1e79e12d0184f9b96ac0b4291b.jpg"}]}} 2024-03-12 21:40:44,182 DEBUG: Plex event detected is: media.play INFO: 127.0.0.1:50975 - "POST /plex HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application Traceback (most recent call last): File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connection.py", line 174, in _new_conn conn = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\util\connection.py", line 95, in create_connection raise err File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\util\connection.py", line 85, in create_connection sock.connect(sa) TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connectionpool.py", line 714, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connectionpool.py", line 415, in _make_request conn.request(method, url, **httplib_request_kw) File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 1286, in request self._send_request(method, url, body, headers, encode_chunked) File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 1332, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 1281, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 1041, in _send_output self.send(msg) File "C:\Users\sdspi\miniconda3\Lib\http\client.py", line 979, in send self.connect() File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connection.py", line 205, in connect conn = self._new_conn() ^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connection.py", line 179, in _new_conn raise ConnectTimeoutError( urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x0000012798F98590>, 'Connection to 192.168.1.111 timed out. (connect timeout=None)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\adapters.py", line 487, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\connectionpool.py", line 798, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\urllib3\util\retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.111', port=32400): Max retries exceeded with url: /library/metadata/6808 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x0000012798F98590>, 'Connection to 192.168.1.111 timed out. (connect timeout=None)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\sdspi\miniconda3\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 69, in call return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\fastapi\applications.py", line 1054, in call await super().call(scope, receive, send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\middleware\errors.py", line 186, in call raise exc File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\middleware\errors.py", line 164, in call await self.app(scope, receive, _send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 758, in call await self.middleware_stack(scope, receive, send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 778, in app await route.handle(scope, receive, send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 299, in handle await self.app(scope, receive, send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 79, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\routing.py", line 74, in app response = await func(request) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\fastapi\routing.py", line 278, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\fastapi\routing.py", line 193, in run_endpoint_function return await run_in_threadpool(dependant.call, values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\starlette\concurrency.py", line 42, in run_in_threadpool return await anyio.to_thread.run_sync(func, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\anyio_backends_asyncio.py", line 2144, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\anyio_backends_asyncio.py", line 851, in run result = context.run(func, args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Plex\subgen\subgen\subgen\subgen.py", line 231, in receive_plex_webhook fullpath = get_plex_file_name(plex_json['Metadata']['ratingKey'], plexserver, plextoken) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Plex\subgen\subgen\subgen\subgen.py", line 518, in get_plex_file_name response = requests.get(url, headers=headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\api.py", line 73, in get return request("get", url, params=params, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\api.py", line 59, in request return session.request(method=method, url=url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sdspi\miniconda3\Lib\site-packages\requests\adapters.py", line 508, in send raise ConnectTimeout(e, request=request) requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='192.168.1.111', port=32400): Max retries exceeded with url: /library/metadata/6808 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x0000012798F98590>, 'Connection to 192.168.1.111 timed out. (connect timeout=None)'))

— Reply to this email directly, view it on GitHub https://github.com/McCloudS/subgen/issues/58#issuecomment-1992547357, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJACQMG7V2ENSXNWJ7PCMDYX5STHAVCNFSM6AAAAABEQ2VCW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJSGU2DOMZVG4 . You are receiving this because you commented.Message ID: @.***>

McCloudS commented 4 months ago

Closing due to configuration issues. Recommended reading documentation.