Closed MalakaSupun closed 2 years ago
Hi @MalakaSupun Could you please indicate which Python version you're using? Also, please try saving in another folder that's not the root of the OS. In this case I see you're saving into E:\ Can you create a folder within E and try again? (Example E:\Videos)
I've tried on my Python 3.7 installation with these packages: PyQt5==5.14.1 PyQt5-sip==12.7.1 pytube==11.0.2 typing-extensions==3.7.4.1
Let me know how it goes and I'll try to help further.
Have a good one
Thanks for your response... I am using python 3.9.... I am going to try this again using python 3.7. I wil inform you about progress. Thanks again.
I managed to reproduce the error; but not in its entirety. Got none of the "freezing" issues. Now, the freezing issue might indicate a possible thing related to the I/O, be it either a device or anything.
Attempt 1. Python 3.9.10, Windows, Video with special characters in the title. FAILED. Got traceback errors because there are funny characters in the video name. As you can see on line 2 of the log.
INFO - URL: https://www.youtube.com/watch?v=KDAznRsfPjo
INFO - Video Title: BANANA BREAD LOAF 香蕉土司麵包 | Apron
INFO - Video Thumbnail: https://i.ytimg.com/vi/KDAznRsfPjo/sddefault.jpg
INFO - function: getSaveLocation - directory: C:/test_videos_download
INFO - itag of quality selected is 22
Traceback (most recent call last):
File "c:\test_vdownloader\video-downloader\youtubedl\gui.py", line 168, in download_button
self.ytube.download(location=self.user_directory, itag=itag)
File "c:\test_vdownloader\video-downloader\youtubedl\core.py", line 203, in download
stream.download(output_path=location, filename=video_filename)
File "C:\test_vdownloader\video-downloader\env39\lib\site-packages\pytube\streams.py", line 250, in download
with open(file_path, "wb") as fh:
OSError: [Errno 22] Invalid argument: 'C:/test_videos_download\\BANANA BREAD LOAF ?????? | Apron (720p)'
Attempt 2. Python 3.9.10, Windows, Video with no special characters in the title. SUCCESS
(env39) c:\test_vdownloader\video-downloader\youtubedl>python gui.py
INFO - URL: https://www.youtube.com/watch?v=jJ49HpLdZJk
INFO - Video Title: Japanese Milk Bread|Shokupan|Apron
INFO - Video Thumbnail: https://i.ytimg.com/vi/jJ49HpLdZJk/sddefault.jpg
INFO - URL: https://www.youtube.com/watch?v=-2HCxy4Kh4E
INFO - Video Title: Tutorial: How to Create Robotic Arms in Blender
INFO - Video Thumbnail: https://i.ytimg.com/vi/-2HCxy4Kh4E/sddefault.jpg
INFO - function: getSaveLocation - directory: C:/test_videos_download
INFO - itag of quality selected is 22
c:\test_vdownloader\video-downloader\youtubedl\gui.py:191: DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
self.progressBar.setValue(
INFO - Video Title: Tutorial: How to Create Robotic Arms in Blender
Could you try: 0) Use pytube, not pytube3 (crucial) 1) Select save location into the same disk as you have the OS. Create a folder in your desktop or anywhere and use that as a destination for the saved files. 2) Run all this in Python 3.7 (Python 3.7 is supported. If you need install instructions, do give a shout. I can help with that, even if you're not familiar with Python.
Let me know how it goes. Kind Regards Chonix.
Thanks for your response... Yes, it's worked. I used python 3.7 and follow that the steps you have recommended. I think that , using "Qthread" we can overcome this problem. thanks again.....
Thanks for your response... Yes, it's worked. I used python 3.7 and follow that the steps you have recommended. I think that , using "Qthread" we can overcome this problem. thanks again.....
Hey. Glad it worked for you. If you do want to contribute to the project, please feel free to send a pull request.
I'll give it a try on the method you mention. We had some sync issues in the past that were part of QT's libraries, but we didn't narrow it down to what was actually the cause 100%. So we'd appreciate if you had a fix for this and would like to contribute to the project (though we'd have to do some housekeeping first 🤣 )
Anyway, glad it worked for you. Any further questions or suggestions, please feel free to send them our way. And I'm not being sarcastic at all :)
Kind Regards, Chonix
The window is Not-Responding when I tried to get a YouTube thumbnail
When I tried to download the video, The window got stuck again.
I have tried to use “Application.processEvents()” as well. But didn’t work. help please!!!