AttributeError exception when specifying extension and resolution to get()
See original GitHub issueUsing version 0.2 from PyPI, an AttributeError
exception is thrown when both the file extension and resolution are specified. It works if I remove the resolution
arg, but a higher resolution (720p
) is downloaded.
from pytube import YouTube
yt = YouTube()
yt.url = "http://www.youtube.com/watch?v=R7yfISlGLNU"
video = yt.get(extension='mp4', resolution='360p')
video.download()
The video exists as can be seen from filter
:
>>> yt.filter('mp4', '360p')
[<Video: H.264 (.mp4) - 360p - Baseline>]
Error at last line:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'download'
Issue Analytics
- State:
- Created 8 years ago
- Comments:10
Top Results From Across the Web
Extension 'cogs.cmds' raised an error: AttributeError: 'Bot ...
The answer is really simple. discord.Bot doesn't support prefix commands, only application ones (like slash commands and context menus).
Read more >Sphinx throws errors when using function in __getattr__ override
Describe the bug When using anonymous functions in getattr sphinx will raise an error: Handler for event 'autodoc-process-signature' threw ...
Read more >Source code for imexam.ds9_viewer
If one extension of an MEF file is loaded this will be 1 regardless of the extension that was specified (because DS9 and...
Read more >Reading and saving image files with Python, OpenCV (imread ...
In Python and OpenCV, you can read (load) and write (save) image files with cv2.imread() and cv2.imwrite() . Images are read as NumPy...
Read more >3. Data model — Python 3.11.1 documentation
Function objects also support getting and setting arbitrary attributes, ... an exception when no appropriate method is defined (typically AttributeError or ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i’m using the latest version of pytube and still have the problem with YouTube
AttributeError Traceback (most recent call last) <ipython-input-35-382c586705bd> in <module>() ----> 1 yt.download(r"C:\Users\pruthvi kumar\Desktop\extra")
AttributeError: ‘YouTube’ object has no attribute ‘download’
I am facing an error while working with YouTube video downloader using python, How can I solve this issue?