Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3756

Error When Uploading Videos via the Youtube Data API v3

$
0
0

I am currently writing an application that involves the uploading of videos to Youtube using the Youtube Data API v3 with Python. This has been working until recently, in which I am suddenly receiving a strange error.

I use the following code to upload videos:

from subprocess import runcommand = f'python3 uploadYoutube.py --file="{video_name}" --title="{title}" --description="{vid_des}" --keywords={keywords}" --category="{category}" --privacyStatus="public"'terminal_output = run(command, capture_output=True).stdoutprint(terminal_output)

Where the variables inside the f-string are neither empty nor contain the characters < or >.

This provides the following error:

An HTTP error 400 occurred:\r\nb\'{\\n  "error": {\\n    "code": 400,\\n    "message": "The request metadata specifies an invalid or empty video title.",\\n    "errors": [\\n      {\\n        "message": "The request metadata specifies an invalid or empty video title.",\\n        "domain": "youtube.video",\\n        "reason": "invalidTitle",\\n        "location": "body.snippet.title",\\n        "locationType": "other"\\n      }\\n    ]\\n  }\\n}\\n\'\r\n'

What is the reason for this error?


Viewing all articles
Browse latest Browse all 3756

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>