carolinux / gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
0 stars 1 forks source link

400 "Content not allowed in prolog" after yt_service.AddVideoResponse(...) #634

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. authenticate yt_service
2. yt_service.AddVideoResponse(any_video_id, your_video_id)

What is the expected output? What do you see instead?
I expected that I will receive message to confirm video response (I was posting 
it to my own video), instead I saw traceback.   

What version of the product are you using?
2.0.17   

Please provide any additional information below.
I tried: 
- not authenticating (then I received "not authenticated" error) 
- different videos 
- debugging library  

Moreover I tried posting information by this:

def add_video_response(self, response_video_id):
    YOUTUBE_VIDEO_URI = 'https://gdata.youtube.com/feeds/api/videos'         
    post_uri = '%s/%s/%s' % (YOUTUBE_VIDEO_URI, self.id, 'responses')
    data = urllib.urlencode({'id': response_video_id})
    headers = {'Content-Type': 'application/x-www-form-urlencoded'}
    request = urllib2.Request(post_uri, data, headers)
    urllib2.urlopen(request)

Original issue reported on code.google.com by kern3...@gmail.com on 22 Aug 2012 at 6:42