ytstudio icon indicating copy to clipboard operation
ytstudio copied to clipboard

Unable to Upload Video

Open gauravzazz opened this issue 2 years ago • 2 comments

Hi Yusufusta, great work This code used to run on previous commit but getting following error :

File "D:\ytstudio\examples\upload_video.py", line 23, in main print(f"successfully uploaded! videoId: {sonuc['videoId']}")

KeyError: 'videoId'

Do you have any idea why this is popping up ? Thanks in advance.

gauravzazz avatar Feb 10 '23 20:02 gauravzazz

Hello. I assume this is because the video was not successfully uploaded for some reason and thus there is no video ID generated. Could you verify if the upload was successful? I experienced the same issue.

The KeyError is not the main issue; it's just that it will attempt to index the id even in failure.

sguzman avatar Apr 26 '23 19:04 sguzman

I forgot to add something! The reason I was getting upload failures was because the title and descriptions in my case were not properly formatted or contained invalid characters.

{'error': {'code': 400, 'message': 'Invalid value at 'initial_metadata.title' (type.googleapis.com/youtube.api.pfiinnertube.YoutubeApiInnertube.MdeTitleUpdateRequest)

sguzman avatar Apr 26 '23 19:04 sguzman