TypeError when trying to upload Pictures from Google App Engine to Picasa with the GData API
- 阅读更多 关于 TypeError when trying to upload Pictures from Google App Engine to Picasa with the GData API
I'm trying to write a small tool to upload Pictures from Google App Engine to Picasa. Fetching the image works, but when i try to upload it i get the error " TypeError: stat() argument 1 must be (encoded string without NULL bytes), not str " The Code basically looks like this: def getfile(url): result = urlfetch.fetch(url) if result.status_code == 200: return (result.content) logging.error ("[-] Error fetching URL: %s" % url) def uploadpicture(comment,pic): album_url = '/data/feed/api/user/%s/album/%s' % (username, album) fname = "image.jpg" entry = gd_client.InsertPhotoSimple(album_url, fname