Sunday, March 18, 2012

[YouTube-API] Bug: Internal server error from UpdatePlaylistVideoEntryMetaData

This is probably a bug. I want to programically change video position on playlist. But when I invoke UpdatePlaylistVideoEntryMetaData I end up with exception informing internal server error.

 File "C:\Python27\lib\site-packages\gdata\youtube\service.py", line 1044, in UpdatePlaylistVideoEntryMetaData
    converter=gdata.youtube.YouTubePlaylistVideoEntryFromString)
  File "C:\Python27\lib\site-packages\gdata\service.py", line 1395, in Put
    media_source=media_source, converter=converter)
  File "C:\Python27\lib\site-packages\gdata\service.py", line 1358, in PostOrPut
    'reason': server_response.reason, 'body': result_body}
gdata.service.RequestError: {'status': 500, 'body': 'Internal Error', 'reason':
'Internal Server Error'}

I'm sure I pass correct playlist_url and entry_id. This behaviour shows up no matter if I pass strings or None's as new_title and new_description.

What is most interesting here, the position of track on the playlist is actually changed, so it works as expected. So simple workaround is to catch and choke RequestError from the line with UpdatePlaylistVideoEntryMetaData. But it's obviously very ugly.

--
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/-/Kkh6JSbgQYoJ.
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