mps-youtube / yewtube

yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
GNU General Public License v3.0
8.13k stars 643 forks source link

Support py3.12 #1256

Closed chenrui333 closed 8 months ago

chenrui333 commented 1 year ago

Issue / Suggestion

Trying to build the latest release against py3.12, but ran into some runtime failure as below

Expected "/opt/homebrew/Cellar/mps-youtube/0.2.8_13/libexec/lib/python3.12/site-packages/pafy/channel.py:201: SyntaxWarning: invalid escape sequence '\\/'\n  chanR = re.compile('.+channel\\/([^\\/]+)$')\n/opt/homebrew/Cellar/mps-youtube/0.2.8_13/libexec/lib/python3.12/site-packages/pafy/channel.py:202: SyntaxWarning: invalid escape sequence '\\/'\n  userR = re.compile('.+user\\/([^\\/]+)$')\n/opt/homebrew/Cellar/mps-youtube/0.2.8_13/libexec/lib/python3.12/site-packages/mps_youtube/util.py:463: SyntaxWarning: invalid escape sequence '\\s'\n  m = re.search('MPlayer SVN[\\s-]r([0-9]+)', o, re.MULTILINE|re.IGNORECASE)\n/opt/homebrew/Cellar/mps-youtube/0.2.8_13/libexec/lib/python3.12/site-packages/mps_youtube/util.py:480: SyntaxWarning: invalid escape sequence '\\('\n  t = re.sub(\"[\\(\\[].*?[\\)\\]]\", \"\", song_title.lower())\ndyld[4187]: Library not loaded: @loader_path/../../../../opt/vapoursynth/lib/libvapoursynth-script.0.dylib\n  Referenced from: <D89FCA70-1280-3648-94EF-D9FD6105E7CE> /opt/homebrew/Cellar/mpv/0.36.0/bin/mpv\n  Reason: tried: '/opt/homebrew/Cellar/mpv/0.36.0/bin/../../../../opt/vapoursynth/lib/libvapoursynth-script.0.dylib' (no such file), '/usr/local/lib/libvapoursynth-script.0.dylib' (no such file), '/usr/lib/libvapoursynth-script.0.dylib' (no such file, not in dyld cache)\nTraceback (most recent call last):\n  File \"/opt/homebrew/Cellar/mps-youtube/0.2.8_13/bin/mpsyt\", line 5, in <module>\n    from mps_youtube import main\n  File \"/opt/homebrew/Cellar/mps-youtube/0.2.8_13/libexec/lib/python3.12/site-packages/mps_youtube/__init__.py\", line 8, in <module>\n    init.init()\n  File \"/opt/homebrew/Cellar/mps-youtube/0.2.8_13/libexec/lib/python3.12/site-packages/mps_youtube/init.py\", line 47, in init\n    config.PLAYER.set(mpv)\n  File \"/opt/homebrew/Cellar/mps-youtube/0.2.8_13/libexec/lib/python3.12/site-packages/mps_youtube/config.py\", line 144, in set\n    checked = self.check_fn(value)\n              ^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/homebrew/Cellar/mps-youtube/0.2.8_13/libexec/lib/python3.12/site-packages/mps_youtube/config.py\", line 253, in check_player\n    util.load_player_info(player)\n  File \"/opt/homebrew/Cellar/mps-youtube/0.2.8_13/libexec/lib/python3.12/site-packages/mps_youtube/util.py\", line 408, in load_player_info\n    g.mpv_version = _get_mpv_version(player)\n                    ^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/homebrew/Cellar/mps-youtube/0.2.8_13/libexec/lib/python3.12/site-packages/mps_youtube/util.py\", line 446, in _get_mpv_version\n    o = subprocess.check_output([exename, \"--version\"]).decode()\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/homebrew/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py\", line 466, in check_output\n    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/homebrew/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py\", line 571, in run\n    raise CalledProcessError(retcode, process.args,\nsubprocess.CalledProcessError: Command '['mpv', '--version']' died with <Signals.SIGABRT: 6>.\n" to be empty.

build logs, https://gist.github.com/chenrui333/88a573b788a58ce8660adffe34c041d8 relates to https://github.com/Homebrew/homebrew-core/pull/151128

feoh commented 1 year ago

Could this issue be homebrew related?

You might try installing and building yewtube in a virtual environment with 3.12 and see if you encounter the same error.