youtube.UpdateVideoEntry: edit_uri referenced before assignment

8 views
Skip to first unread message

Henrik Lied

unread,
Oct 21, 2009, 8:44:29 AM10/21/09
to GData Python Client Library Contributors
Hi there!

I'm trying to update the private-attribute on a YouTubeVideoEntry, but
I get the error 'edit_uri referenced before assignment in
UpdateVideoEntry'.

Here's how I do it:

>>> for video_id in youtube_video_ids:
>>> entry = youtube.youtube.GetYouTubeVideoEntry(video_id=video_id)
>>> entry.media.private = None
>>> youtube.UpdateVideoEntry(entry)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Library/Python/2.6/site-packages/gdata/youtube/service.py",
line 742, in UpdateVideoEntry
return self.Put(video_entry, uri=edit_uri,
UnboundLocalError: local variable 'edit_uri' referenced before
assignment


Any idea why?

Michael Bernstein

unread,
Oct 21, 2009, 1:52:56 PM10/21/09
to gdata-python-client-...@googlegroups.com
I reported this error but I'm still waiting on the moderators to post
it, I think. Right now, as far as I can see, you can only update a
video entry that you've just uploaded. You can force feed the
edit_uri, but that isn't guaranteed to work either.

I'm going to assume that you're authenticated as well, since I had the
same issues while passing in valid authtokens. I ended up just
directing using the google api via some http verbs.

Michael Bernstein
simo...@gmail.com
Reply all
Reply to author
Forward
0 new messages