You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the great tool! I am having trouble running it, though. In my attempt to reproduce the example in https://kpj.github.io/my_projects/clypper.html, I am getting HTTP Error 410: Gone from the urlib module. Here's the full output:
$ cat innocent.txt
https://www.youtube.com/watch?v=-tvA3Ezqjl8 12:32 12:34.7
https://www.youtube.com/watch?v=dQw4w9WgXcQ 00:42 00:43.1
$ clypper -i innocent.txt -o ohno.mp4
Processing clips: 0%| | 0/2 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/Users/pedrof/miniconda3/bin/clypper", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/site-packages/clypper/cli.py", line 22, in main
handle(input_file, output_file, Path(temp_dir))
File "/Users/pedrof/miniconda3/lib/python3.12/site-packages/clypper/clypper.py", line 74, in handle
vid.load()
File "/Users/pedrof/miniconda3/lib/python3.12/site-packages/clypper/video_sources.py", line 115, in load
self.yt = YouTube(self.url)
^^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/site-packages/pytube/__main__.py", line 91, in __init__
self.prefetch()
File "/Users/pedrof/miniconda3/lib/python3.12/site-packages/pytube/__main__.py", line 181, in prefetch
self.vid_info_raw = request.get(self.vid_info_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/site-packages/pytube/request.py", line 36, in get
return _execute_request(url).read().decode("utf-8")
^^^^^^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/site-packages/pytube/request.py", line 24, in _execute_request
return urlopen(request) # nosec
^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/urllib/request.py", line 215, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/urllib/request.py", line 521, in open
response = meth(req, response)
^^^^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/urllib/request.py", line 630, in http_response
response = self.parent.error(
^^^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/urllib/request.py", line 553, in error
result = self._call_chain(*args)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/urllib/request.py", line 492, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/urllib/request.py", line 745, in http_error_302
return self.parent.open(new, timeout=req.timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/urllib/request.py", line 521, in open
response = meth(req, response)
^^^^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/urllib/request.py", line 630, in http_response
response = self.parent.error(
^^^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/urllib/request.py", line 559, in error
return self._call_chain(*args)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/urllib/request.py", line 492, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "/Users/pedrof/miniconda3/lib/python3.12/urllib/request.py", line 639, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 410: Gone
The two youtube urls definitely exist, though.
The text was updated successfully, but these errors were encountered:
This is apparently an issue with the pytube3 package (get-pytube/pytube3#121).
To fix this, I switched to the pytube package.
This however leads to the error urllib.error.HTTPError: HTTP Error 400: Bad Request.
Which could be fixed by using pytubefix instead.
As I updated the dependencies, this now leads to the error AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS' in the package moviepy.
But that could be fixed by adding the opencv-python dependency.
After this fun debugging trip, I was able to create the output video.
Can you reinstall (from GitHub) and test if it also works for you?
I created a fresh conda environment and managed to install the package. After also installing ffmpeg and imagemagick, I could run clypper and create the output video. Thanks a lot!
Thanks for the great tool! I am having trouble running it, though. In my attempt to reproduce the example in https://kpj.github.io/my_projects/clypper.html, I am getting
HTTP Error 410: Gone
from theurlib
module. Here's the full output:The two youtube urls definitely exist, though.
The text was updated successfully, but these errors were encountered: