{"action":"closed","issue":{"url":"https://api.github.com/repos/halcy/Mastodon.py/issues/137","repository_url":"https://api.github.com/repos/halcy/Mastodon.py","labels_url":"https://api.github.com/repos/halcy/Mastodon.py/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/halcy/Mastodon.py/issues/137/comments","events_url":"https://api.github.com/repos/halcy/Mastodon.py/issues/137/events","html_url":"https://github.com/halcy/Mastodon.py/issues/137","id":328727960,"node_id":"MDU6SXNzdWUzMjg3Mjc5NjA=","number":137,"title":"Error using update_credentials to update the avatar","user":{"login":"Lertsenem","id":1083508,"node_id":"MDQ6VXNlcjEwODM1MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/1083508?v=4","gravatar_id":"","url":"https://api.github.com/users/Lertsenem","html_url":"https://github.com/Lertsenem","followers_url":"https://api.github.com/users/Lertsenem/followers","following_url":"https://api.github.com/users/Lertsenem/following{/other_user}","gists_url":"https://api.github.com/users/Lertsenem/gists{/gist_id}","starred_url":"https://api.github.com/users/Lertsenem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lertsenem/subscriptions","organizations_url":"https://api.github.com/users/Lertsenem/orgs","repos_url":"https://api.github.com/users/Lertsenem/repos","events_url":"https://api.github.com/users/Lertsenem/events{/privacy}","received_events_url":"https://api.github.com/users/Lertsenem/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-06-02T09:02:20Z","updated_at":"2018-06-04T15:36:38Z","closed_at":"2018-06-04T15:36:37Z","author_association":"NONE","body":"I'm getting 500 errors when trying to upload new avatars, using the documented method.\r\n\r\nMy code goes as follow:\r\n\r\n```\r\nimage = requests.get( image_url )\r\nimage_extension = image_url.split(\".\")[-1]\r\nimage_64_raw = base64.b64encode( image.content )\r\nimage_64 = \"data:image/{};base64,{}.format( image_extension, image_64_raw.decode(\"ascii\")\r\n```\r\n\r\nmstdn.account_update_credentials( avatar = image_64 )`\r\n\r\n(where `mstdn` is a valid Mastodon instance and `image_url` a valid image url, of course).\r\n\r\nThe result is just:\r\n```\r\n('Mastodon API returned error', 500, 'Internal Server Error', None)\r\n```\r\n\r\nI am obviously missing something, but I can't figure what it is... please help ?"}}
{"actor":{"display_login":"halcy"}}