python-20 / video-downloader

A python application to download videos
GNU General Public License v3.0
10 stars 10 forks source link

Adjust ui to use tabs #74

Closed cherylli closed 4 years ago

cherylli commented 4 years ago

chonix commented 4 years ago

Hey, pulled the request and somehow it breaks when trying to download the file

` INFO - function: getSaveLocation - directory: C:/project/test/video-downloader/downloads

INFO - itag of quality selected is 18 Traceback (most recent call last): File "youtubedl\gui.py", line 149, in download_button self.ytube.download(location=self.user_directory, itag=itag) File "C:\project\test\video-downloader\youtubedl\core.py", line 203, in download stream.download(output_path=location, filename=video_filename) File "C:\project\test\video-downloader\env\lib\site-packages\pytube\streams.py", line 241, in download self.on_progress(chunk, fh, bytes_remaining) File "C:\project\test\video-downloader\env\lib\site-packages\pytube\streams.py", line 302, in on_progress self._monostate.on_progress(self, chunk, bytes_remaining) File "youtubedl\gui.py", line 173, in download_progress round((1 - bytes_remaining / file_size) * 100, 3)) TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'`

AlexPHorta commented 4 years ago

You just opened the program and it crashed? Or did you do something before? Worked alright in my machine, or so it seems.

cherylli commented 4 years ago

I think it has to do with pytube. What version are you using @AlexPHorta ? Mines Pytube3 - 9.5.11

cherylli commented 4 years ago

They changed something in callback about 12 days ago https://github.com/get-pytube/pytube3 under callbacks

chonix commented 4 years ago

They changed something in callback about 12 days ago https://github.com/get-pytube/pytube3 under callbacks

Yep, you're right. On pytube3 version 9.6.2 it works as expected.

Approved on my behalf