Thursday, December 29, 2011

[YouTube-API] Malformed request

I am using a ResumableUploader in VB.NET to upload, but when I start the upload, it returns a 400 code with the following:

HTTP/1.1 400 Bad Request
Server: HTTP Upload Server Built on Dec 13 2011 15:55:44 (1323820544)
X-GData-User-Country: US
Content-Type: text/xml; charset=UTF-8
X-GUploader-UploadID: AEnB2UoQLXSm3fWStwi2K1nflid728SLVCMstGQFEXfkFjZVXxyH2wLtp1Y3khBuWcNNDIvI8ydZ7j6j3mXxFHKGsfUHis1QFg
Date: Fri, 30 Dec 2011 03:03:11 GMT
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate
Content-Length: 257

<?xml version='1.0' encoding='UTF-8'?><errors><error><domain>yt:validation</domain><code>invalid_value</code><location type='xpath'>media:group/media:category[@scheme='http://gdata.youtube.com/schemas/2007/categories.cat']/text()</location></error></errors>

It looks like there is a problem with either the video category. I see no problems with the code I have since it practically came out of the google documentation. For reference, the line that sets the category is as follows:
video.Tags.Add(New MediaCategory(queue.Items.Item(currentitem).subitems(4).text, YouTubeNameTable.CategorySchema))
It reads from the listview subitem, which I currently have 'Gaming' as the category.

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/youtube-api-gdata/-/KAk79z4PT9AJ.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment