Skip to content

자막이 없는 영상을 대상으로 자막 다운로드를 하면 컨테이너가 에러와 함께 먹통이 됩니다 rest api도 에러 #49

@sruinz

Description

@sruinz

`

modenaf360-youtube-dl-nas1

date stream content
2025/07/14 06:51:40 stderr IndexError: list index out of range
2025/07/14 06:51:40 stderr sub_lang = url[2].split('|')[1]
2025/07/14 06:51:40 stderr File "/usr/src/app/youtube-dl-server.py", line 527, in build_youtube_dl_cmd
2025/07/14 06:51:40 stderr result = subprocess.run(build_youtube_dl_cmd(url))
2025/07/14 06:51:40 stderr File "/usr/src/app/youtube-dl-server.py", line 726, in download_rest
2025/07/14 06:51:40 stderr download_rest(item)
2025/07/14 06:51:40 stderr File "/usr/src/app/youtube-dl-server.py", line 510, in dl_worker
2025/07/14 06:51:40 stderr self._target(*self._args, **self._kwargs)
2025/07/14 06:51:40 stderr File "/usr/local/lib/python3.10/threading.py", line 953, in run
2025/07/14 06:51:40 stderr self.run()
2025/07/14 06:51:40 stderr 172.17.0.1 - - [2025-07-14 06:51:40] "POST /youtube-dl/rest HTTP/1.1" 200 192 0.001857
2025/07/14 06:51:40 stderr File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
2025/07/14 06:51:40 stderr Traceback (most recent call last):
2025/07/14 06:51:40 stderr Exception in thread Thread-1 (dl_worker):
2025/07/14 06:51:14 stderr  
2025/07/14 06:51:14 stderr Hit Ctrl-C to quit.
2025/07/14 06:51:14 stderr Listening on http://0.0.0.0:8080/
2025/07/14 06:51:14 stderr Bottle v0.13.4 server starting up (using GeventWebSocketServer())...
2025/07/14 06:51:14 stdout Loaded 0 history items
2025/07/14 06:51:14 stdout Scheduler failed to start!
2025/07/14 06:51:14 stderr For more details see ps(1).
2025/07/14 06:51:14 stderr  
2025/07/14 06:51:14 stderr for additional help text.
2025/07/14 06:51:14 stderr or 'ps --help <s|l|o|t|m|a>'
2025/07/14 06:51:14 stderr Try 'ps --help <simple|list|output|threads|misc|all>'
2025/07/14 06:51:14 stderr  
2025/07/14 06:51:14 stderr ps [options]
2025/07/14 06:51:14 stderr Usage:
2025/07/14 06:51:14 stderr  
2025/07/14 06:51:14 stderr error: process ID list syntax error
2025/07/14 06:51:12 stderr WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
2025/07/14 06:51:12 stdout Successfully installed nlptutti-0.0.0.10
2025/07/14 06:51:12 stdout Successfully uninstalled nlptutti-0.0.0.9
2025/07/14 06:51:12 stdout Uninstalling nlptutti-0.0.0.9:
2025/07/14 06:51:12 stdout Found existing installation: nlptutti 0.0.0.9
2025/07/14 06:51:12 stdout Attempting uninstall: nlptutti
2025/07/14 06:51:12 stdout Installing collected packages: nlptutti
2025/07/14 06:51:12 stdout Downloading nlptutti-0.0.0.10-py3-none-any.whl (11 kB)
2025/07/14 06:51:12 stdout Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/site-packages (from python-dateutil>=2.8.2->pandas->nlptutti->-r /usr/src/app/init_update.txt (line 3)) (1.17.0)
2025/07/14 06:51:12 stdout Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.10/site-packages (from pandas->nlptutti->-r /usr/src/app/init_update.txt (line 3)) (2025.2)
2025/07/14 06:51:12 stdout Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/site-packages (from pandas->nlptutti->-r /usr/src/app/init_update.txt (line 3)) (2025.2)
2025/07/14 06:51:12 stdout Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/site-packages (from pandas->nlptutti->-r /usr/src/app/init_update.txt (line 3)) (2.9.0.post0)
2025/07/14 06:51:12 stdout Requirement already satisfied: numpy>=1.22.4 in /usr/local/lib/python3.10/site-packages (from pandas->nlptutti->-r /usr/src/app/init_update.txt (line 3)) (2.2.6)
2025/07/14 06:51:12 stdout Requirement already satisfied: rapidfuzz>=3.9.7 in /usr/local/lib/python3.10/site-packages (from jiwer->nlptutti->-r /usr/src/app/init_update.txt (line 3)) (3.13.0)
2025/07/14 06:51:12 stdout Requirement already satisfied: click>=8.1.8 in /usr/local/lib/python3.10/site-packages (from jiwer->nlptutti->-r /usr/src/app/init_update.txt (line 3)) (8.2.1)
2025/07/14 06:51:12 stdout Requirement already satisfied: pandas in /usr/local/lib/python3.10/site-packages (from nlptutti->-r /usr/src/app/init_update.txt (line 3)) (2.3.0)
2025/07/14 06:51:12 stdout Requirement already satisfied: jiwer in /usr/local/lib/python3.10/site-packages (from nlptutti->-r /usr/src/app/init_update.txt (line 3)) (4.0.0)
2025/07/14 06:51:12 stdout Downloading nlptutti-0.0.0.10-py3-none-any.whl.metadata (14 kB)
2025/07/14 06:51:12 stdout Collecting nlptutti (from -r /usr/src/app/init_update.txt (line 3))
2025/07/14 06:51:12 stdout Requirement already satisfied: nlptutti in /usr/local/lib/python3.10/site-packages (from -r /usr/src/app/init_update.txt (line 3)) (0.0.0.9)
2025/07/14 06:51:12 stdout Requirement already satisfied: yt-dlp in /usr/local/lib/python3.10/site-packages (from -r /usr/src/app/init_update.txt (line 2)) (2025.6.30)
2025/07/14 06:51:11 stdout Requirement already satisfied: youtube-dl in /usr/local/lib/python3.10/site-packages (from -r /usr/src/app/init_update.txt (line 1)) (2021.12.17)
2025/07/14 06:51:10 stderr WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
2025/07/14 06:51:10 stdout Successfully installed pip-25.1.1
2025/07/14 06:51:09 stdout Successfully uninstalled pip-23.0.1
2025/07/14 06:51:09 stdout Uninstalling pip-23.0.1:
2025/07/14 06:51:09 stdout Found existing installation: pip 23.0.1
2025/07/14 06:51:09 stdout Attempting uninstall: pip
2025/07/14 06:51:09 stdout Installing collected packages: pip
2025/07/14 06:51:09 stdout ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 30.5 MB/s eta 0:00:00
2025/07/14 06:51:09 stdout Downloading pip-25.1.1-py3-none-any.whl (1.8 MB)
2025/07/14 06:51:09 stdout Collecting pip
2025/07/14 06:51:09 stdout Requirement already satisfied: pip in /usr/local/lib/python3.10/site-packages (23.0.1)

`

시놀로지 컨테이너 로그 파일인데 rest api로 자막 다운로드를 시도 했을 때 이렇게 에러가 뜨고 컨테이너가 먹통이 되네요

`

modenaf360-youtube-dl-nas1

date stream content
2025/07/14 07:00:41 stdout Loaded 1 history items
2025/07/14 07:00:41 stdout Received: [REQUEST_HISTORY]
2025/07/14 07:00:40 stdout WebSocket connected
2025/07/14 07:00:40 stdout Sent history item 0: 해외 방송에서 모두를 속인 리사 #블랙핑크 #blackpink #kpop
2025/07/14 07:00:40 stdout Sending 1 history items to new client
2025/07/14 07:00:40 stdout Loaded 1 history items
2025/07/14 07:00:40 stdout Client connected. Total clients: 1
2025/07/14 07:00:38 stdout WebSocket disconnected
2025/07/14 07:00:38 stdout Client disconnected. Total clients: 0
2025/07/14 06:59:08 stdout Loaded 1 history items
2025/07/14 06:59:08 stdout Received: [REQUEST_HISTORY]
2025/07/14 06:59:07 stdout WebSocket connected
2025/07/14 06:59:07 stdout Sent history item 0: 해외 방송에서 모두를 속인 리사 #블랙핑크 #blackpink #kpop
2025/07/14 06:59:07 stdout Sending 1 history items to new client
2025/07/14 06:59:07 stdout Loaded 1 history items
2025/07/14 06:59:07 stdout Client connected. Total clients: 1
2025/07/14 06:59:05 stdout WebSocket disconnected
2025/07/14 06:59:05 stdout Client disconnected. Total clients: 0
2025/07/14 06:57:35 stdout Loaded 1 history items
2025/07/14 06:57:35 stdout Received: [REQUEST_HISTORY]
2025/07/14 06:57:34 stdout WebSocket connected
2025/07/14 06:57:34 stdout Sent history item 0: 해외 방송에서 모두를 속인 리사 #블랙핑크 #blackpink #kpop
2025/07/14 06:57:34 stdout Sending 1 history items to new client
2025/07/14 06:57:34 stdout Loaded 1 history items
2025/07/14 06:57:34 stdout Client connected. Total clients: 1
2025/07/14 06:57:33 stdout WebSocket disconnected
2025/07/14 06:57:33 stdout Client disconnected. Total clients: 0
2025/07/14 06:56:54 stderr 172.17.0.1 - - [2025-07-14 06:56:54] "GET /static/downfolder/ HTTP/1.1" 404 894 0.000705
2025/07/14 06:56:47 stderr 172.17.0.1 - - [2025-07-14 06:56:47] "GET /static/downfolder/ HTTP/1.1" 404 894 0.002076
2025/07/14 06:56:03 stdout Download error: list index out of range
2025/07/14 06:56:03 stdout Thumbnail extracted: https://i.ytimg.com/vi/vwWvo7bZLt4/maxresdefault.jpg
2025/07/14 06:55:52 stdout Title extracted: 해외 방송에서 모두를 속인 리사 #블랙핑크 #blackpink #kpop
2025/07/14 06:55:46 stderr 172.17.0.1 - - [2025-07-14 06:55:46] "POST /youtube-dl/q HTTP/1.1" 200 175 0.001715
2025/07/14 06:55:40 stdout Loaded 0 history items
2025/07/14 06:55:40 stdout Received: [REQUEST_HISTORY]
2025/07/14 06:55:40 stdout WebSocket connected
2025/07/14 06:55:40 stdout Sending 0 history items to new client
2025/07/14 06:55:40 stdout Loaded 0 history items
2025/07/14 06:55:40 stdout Client connected. Total clients: 1
2025/07/14 06:55:40 stdout WebSocket disconnected
2025/07/14 06:55:40 stdout Client disconnected. Total clients: 0
2025/07/14 06:55:40 stderr 172.17.0.1 - - [2025-07-14 06:55:40] "GET /youtube-dl HTTP/1.1" 200 18079 0.004308
2025/07/14 06:55:40 stdout CHK :  test
2025/07/14 06:55:40 stderr 172.17.0.1 - - [2025-07-14 06:55:40] "POST /login HTTP/1.1" 303 296 0.001785
2025/07/14 06:55:38 stdout Loaded 0 history items
2025/07/14 06:55:38 stdout Received: [REQUEST_HISTORY]
2025/07/14 06:55:38 stdout WebSocket connected
2025/07/14 06:55:38 stdout Sending 0 history items to new client
2025/07/14 06:55:38 stdout Loaded 0 history items
2025/07/14 06:55:38 stdout Client connected. Total clients: 1
2025/07/14 06:55:38 stderr 172.17.0.1 - - [2025-07-14 06:55:38] "GET / HTTP/1.1" 200 2106 0.001493
2025/07/14 06:55:38 stderr % if msg is not '':
2025/07/14 06:55:38 stderr /usr/src/app/static/template/login.tpl:30: SyntaxWarning: "is not" with a literal. Did you mean "!="?
2025/07/14 06:55:38 stderr 172.17.0.1 - - [2025-07-14 06:55:38] "POST /accept-terms HTTP/1.1" 200 125 0.001287
2025/07/14 06:55:35 stdout WebSocket disconnected
2025/07/14 06:55:35 stdout Client disconnected. Total clients: 0
2025/07/14 06:55:35 stderr 172.17.0.1 - - [2025-07-14 06:55:35] "GET /terms HTTP/1.1" 200 6060 0.006685
2025/07/14 06:55:35 stderr 172.17.0.1 - - [2025-07-14 06:55:35] "GET /youtube-dl HTTP/1.1" 303 169 0.001628
2025/07/14 06:55:35 stdout Error checking terms acceptance:
2025/07/14 06:55:34 stdout Loaded 0 history items
2025/07/14 06:55:34 stdout Received: [REQUEST_HISTORY]
2025/07/14 06:55:34 stdout WebSocket connected
2025/07/14 06:55:34 stdout Sending 0 history items to new client
2025/07/14 06:55:34 stdout Loaded 0 history items
2025/07/14 06:55:34 stdout Client connected. Total clients: 1
2025/07/14 06:55:31 stderr  
2025/07/14 06:55:31 stderr Hit Ctrl-C to quit.
2025/07/14 06:55:31 stderr Listening on http://0.0.0.0:8080/
2025/07/14 06:55:31 stderr Bottle v0.13.4 server starting up (using GeventWebSocketServer())...
2025/07/14 06:55:31 stdout Loaded 0 history items
2025/07/14 06:55:30 stderr For more details see ps(1).
2025/07/14 06:55:30 stderr  
2025/07/14 06:55:30 stderr for additional help text.
2025/07/14 06:55:30 stderr or 'ps --help <s|l|o|t|m|a>'
2025/07/14 06:55:30 stderr Try 'ps --help <simple|list|output|threads|misc|all>'
2025/07/14 06:55:30 stderr  
2025/07/14 06:55:30 stderr ps [options]
2025/07/14 06:55:30 stderr Usage:
2025/07/14 06:55:30 stderr  
2025/07/14 06:55:30 stdout Scheduler failed to start!
2025/07/14 06:55:30 stderr error: process ID list syntax error
2025/07/14 06:55:28 stderr WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
2025/07/14 06:55:28 stdout Successfully installed nlptutti-0.0.0.10
2025/07/14 06:55:28 stdout Successfully uninstalled nlptutti-0.0.0.9
2025/07/14 06:55:28 stdout Uninstalling nlptutti-0.0.0.9:
2025/07/14 06:55:28 stdout Found existing installation: nlptutti 0.0.0.9
2025/07/14 06:55:28 stdout Attempting uninstall: nlptutti
2025/07/14 06:55:28 stdout Installing collected packages: nlptutti
2025/07/14 06:55:28 stdout Downloading nlptutti-0.0.0.10-py3-none-any.whl (11 kB)
2025/07/14 06:55:28 stdout Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/site-packages (from python-dateutil>=2.8.2->pandas->nlptutti->-r /usr/src/app/init_update.txt (line 3)) (1.17.0)
2025/07/14 06:55:28 stdout Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.10/site-packages (from pandas->nlptutti->-r /usr/src/app/init_update.txt (line 3)) (2025.2)
2025/07/14 06:55:28 stdout Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/site-packages (from pandas->nlptutti->-r /usr/src/app/init_update.txt (line 3)) (2025.2)
2025/07/14 06:55:28 stdout Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/site-packages (from pandas->nlptutti->-r /usr/src/app/init_update.txt (line 3)) (2.9.0.post0)
2025/07/14 06:55:28 stdout Requirement already satisfied: numpy>=1.22.4 in /usr/local/lib/python3.10/site-packages (from pandas->nlptutti->-r /usr/src/app/init_update.txt (line 3)) (2.2.6)
2025/07/14 06:55:28 stdout Requirement already satisfied: rapidfuzz>=3.9.7 in /usr/local/lib/python3.10/site-packages (from jiwer->nlptutti->-r /usr/src/app/init_update.txt (line 3)) (3.13.0)
2025/07/14 06:55:28 stdout Requirement already satisfied: click>=8.1.8 in /usr/local/lib/python3.10/site-packages (from jiwer->nlptutti->-r /usr/src/app/init_update.txt (line 3)) (8.2.1)
2025/07/14 06:55:28 stdout Requirement already satisfied: pandas in /usr/local/lib/python3.10/site-packages (from nlptutti->-r /usr/src/app/init_update.txt (line 3)) (2.3.0)
2025/07/14 06:55:28 stdout Requirement already satisfied: jiwer in /usr/local/lib/python3.10/site-packages (from nlptutti->-r /usr/src/app/init_update.txt (line 3)) (4.0.0)
2025/07/14 06:55:28 stdout Downloading nlptutti-0.0.0.10-py3-none-any.whl.metadata (14 kB)
2025/07/14 06:55:28 stdout Collecting nlptutti (from -r /usr/src/app/init_update.txt (line 3))
2025/07/14 06:55:28 stdout Requirement already satisfied: nlptutti in /usr/local/lib/python3.10/site-packages (from -r /usr/src/app/init_update.txt (line 3)) (0.0.0.9)
2025/07/14 06:55:28 stdout Requirement already satisfied: yt-dlp in /usr/local/lib/python3.10/site-packages (from -r /usr/src/app/init_update.txt (line 2)) (2025.6.30)
2025/07/14 06:55:28 stdout Requirement already satisfied: youtube-dl in /usr/local/lib/python3.10/site-packages (from -r /usr/src/app/init_update.txt (line 1)) (2021.12.17)
2025/07/14 06:55:27 stderr WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
2025/07/14 06:55:27 stdout Successfully installed pip-25.1.1
2025/07/14 06:55:26 stdout Successfully uninstalled pip-23.0.1
2025/07/14 06:55:26 stdout Uninstalling pip-23.0.1:
2025/07/14 06:55:25 stdout Found existing installation: pip 23.0.1
2025/07/14 06:55:25 stdout Attempting uninstall: pip
2025/07/14 06:55:25 stdout Installing collected packages: pip
2025/07/14 06:55:25 stdout ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 42.9 MB/s eta 0:00:00
2025/07/14 06:55:25 stdout Downloading pip-25.1.1-py3-none-any.whl (1.8 MB)
2025/07/14 06:55:25 stdout Collecting pip
2025/07/14 06:55:25 stdout Requirement already satisfied: pip in /usr/local/lib/python3.10/site-packages (23.0.1)

`

웹UI 에서 자막 다운로드를 시도 했을 때의 로그는 이렇게 표시 됩니다

유튜브 쇼츠 영상을 대상으로 시도 해봤는데 자막이 없어서 그런 건지 다른 문제가 있는 건지 모르겠네요
다운로드가 안되는 경우라면 실패 처리하고 넘어가야 할 거 같습니다

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions