{"action":"created","issue":{"url":"https://api.github.com/repos/jay0lee/got-your-back/issues/57","labels_url":"https://api.github.com/repos/jay0lee/got-your-back/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/jay0lee/got-your-back/issues/57/comments","events_url":"https://api.github.com/repos/jay0lee/got-your-back/issues/57/events","html_url":"https://github.com/jay0lee/got-your-back/issues/57","id":103305607,"number":57,"title":"When restoring message: \"'str' does not support the buffer interface\" (and Conflict with Gmail's System Labels)","user":{"login":"rakochi","id":13737552,"avatar_url":"https://avatars.githubusercontent.com/u/13737552?v=3","gravatar_id":"","url":"https://api.github.com/users/rakochi","html_url":"https://github.com/rakochi","followers_url":"https://api.github.com/users/rakochi/followers","following_url":"https://api.github.com/users/rakochi/following{/other_user}","gists_url":"https://api.github.com/users/rakochi/gists{/gist_id}","starred_url":"https://api.github.com/users/rakochi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rakochi/subscriptions","organizations_url":"https://api.github.com/users/rakochi/orgs","repos_url":"https://api.github.com/users/rakochi/repos","events_url":"https://api.github.com/users/rakochi/events{/privacy}","received_events_url":"https://api.github.com/users/rakochi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-26T16:00:09Z","updated_at":"2015-12-06T21:43:36Z","closed_at":null,"body":"I made some edits to my copy of gyb to get it working, one of which was checking if a user had any system-applied labels (such as \"Starred\" or \"Important\") and then removing those from the list of labels being applied to the message, because otherwise it would give me an \"HTTP 400 - Invalid label name\" error.\r\n\r\nI am not sure if maybe my edits have caused an issue but now I get the following error:\r\n\r\nUsing backup folder /Users/rakochi/Downloads/Takeout_2/Mail\r\n\r\nRestoring from /Users/rakochi/Downloads/Takeout_2/Mail/Colloquium.mbox\r\nImportant,Colloquium\r\n['Colloquium']\r\n restoring single large message (1/101)                                         Traceback (most recent call last):\r\n  File \"gyb.py\", line 1499, in <module>\r\n    main(sys.argv[1:])\r\n  File \"gyb.py\", line 1219, in main\r\n    mimetype='message/rfc822')\r\n  File \"/Users/rakochi/got-your-back-0.41/oauth2client/util.py\", line 137, in positional_wrapper\r\n    return wrapped(*args, **kwargs)\r\n  File \"/Users/rakochi/got-your-back-0.41/googleapiclient/http.py\", line 472, in __init__\r\n    fd = BytesIO(body)\r\nTypeError: 'str' does not support the buffer interface\r\n\r\nNote that \"Colloquium\" is the only label that is being applied.  Also, I did not make changes to anything outside of gyb.py either."},"comment":{"url":"https://api.github.com/repos/jay0lee/got-your-back/issues/comments/162350310","html_url":"https://github.com/jay0lee/got-your-back/issues/57#issuecomment-162350310","issue_url":"https://api.github.com/repos/jay0lee/got-your-back/issues/57","id":162350310,"user":{"login":"TJMcK","id":9594820,"avatar_url":"https://avatars.githubusercontent.com/u/9594820?v=3","gravatar_id":"","url":"https://api.github.com/users/TJMcK","html_url":"https://github.com/TJMcK","followers_url":"https://api.github.com/users/TJMcK/followers","following_url":"https://api.github.com/users/TJMcK/following{/other_user}","gists_url":"https://api.github.com/users/TJMcK/gists{/gist_id}","starred_url":"https://api.github.com/users/TJMcK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TJMcK/subscriptions","organizations_url":"https://api.github.com/users/TJMcK/orgs","repos_url":"https://api.github.com/users/TJMcK/repos","events_url":"https://api.github.com/users/TJMcK/events{/privacy}","received_events_url":"https://api.github.com/users/TJMcK/received_events","type":"User","site_admin":false},"created_at":"2015-12-06T21:43:36Z","updated_at":"2015-12-06T21:43:36Z","body":"thanks dougjuh, I had this error and editing gyb.py as per your comments worked... but unfortunately I'm now getting a different error: \"ValueError: invalid literal for int() with base 10...\" :("}}