anijackich / kinescope-dl

Command-line program to download videos from Kinescope.io
The Unlicense
125 stars 15 forks source link

Failed to execute script 'kinescope-dl' due to unhandled exception on MacBook M1 #14

Closed delfer closed 8 months ago

delfer commented 9 months ago

Hello! Thank you for this project! I've build it, but script dos't work:

# dist/kinescope-dl
urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
Traceback (most recent call last):
  File "kinescope-dl.py", line 4, in <module>
    from kinescope import KinescopeVideo, KinescopeDownloader
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
  File "kinescope/__init__.py", line 2, in <module>
    from kinescope.downloader import VideoDownloader as KinescopeDownloader
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
  File "kinescope/downloader.py", line 20, in <module>
    class VideoDownloader:
  File "kinescope/downloader.py", line 45, in VideoDownloader
    def _merge_tracks(self, source_video_filepath: str | PathLike,
TypeError: unsupported operand type(s) for |: 'type' and 'ABCMeta'
[996] Failed to execute script 'kinescope-dl' due to unhandled exception!

Build steps:

git clone https://github.com/anijackich/kinescope-dl.git
cd kinescope-dl
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
pip3 install pyinstaller
brew install ffmpeg
brew install bento4
export FFMPEG_PATH=/opt/homebrew/bin/ffmpeg
export MP4DECRYPT_PATH=/opt/homebrew/bin/mp4decrypt
pyinstaller kinescope-dl.spec
dist/kinescope-dl

macOS Sonoma 14.0 (23A344)

anijackich commented 9 months ago

Which version of python are you using?

anijackich commented 8 months ago

It seems that the Python version you are using does not support this kind of type annotation that is used in my project. Install the latest version of Python.

dmitryd commented 3 months ago

If anybody else hits this: python 3.8 does not work but python 3.12 does!