{"action":"created","issue":{"url":"https://api.github.com/repos/mjs/imaptest/issues/78","labels_url":"https://api.github.com/repos/mjs/imaptest/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/mjs/imaptest/issues/78/comments","events_url":"https://api.github.com/repos/mjs/imaptest/issues/78/events","html_url":"https://github.com/mjs/imaptest/issues/78","id":120492999,"number":78,"title":"fetch ENVELOPE doesn't work with gmail","user":{"login":"mjs","id":14993,"avatar_url":"https://avatars.githubusercontent.com/u/14993?v=3","gravatar_id":"","url":"https://api.github.com/users/mjs","html_url":"https://github.com/mjs","followers_url":"https://api.github.com/users/mjs/followers","following_url":"https://api.github.com/users/mjs/following{/other_user}","gists_url":"https://api.github.com/users/mjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjs/subscriptions","organizations_url":"https://api.github.com/users/mjs/orgs","repos_url":"https://api.github.com/users/mjs/repos","events_url":"https://api.github.com/users/mjs/events{/privacy}","received_events_url":"https://api.github.com/users/mjs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-04T21:46:43Z","updated_at":"2015-12-04T21:46:50Z","closed_at":null,"body":"    \n    >>> server.select_folder('william')\n    7L\n    >>> server.fetch(1, (\"ENVELOPE\",))\n    Traceback (most recent call last):\n      File \"<stdin>\", line 1, in <module>\n      File \"imapclient/imapclient.py\", line 436, in fetch\n        return parser(data)\n      File \"imapclient/imapclient.py\", line 573, in parse\n        msgid, data = self.parse_data(response_item)\n      File \"imapclient/imapclient.py\", line 614, in parse_data\n        for name, item in FetchTokeniser().process_pairs(data):\n      File \"imapclient/imapclient.py\", line 699, in process_pairs\n        for m in strict_finditer(self.PAIR_RE, s):\n      File \"imapclient/imapclient.py\", line 763, in strict_finditer\n        \"%r before -- %r remains\" % (s[:i], s[i:]))\n    ValueError: failed to match all of input. 'UID 1 ENVELOPE (\"Fri, 16 Jul 2004 15:59:43 -0400\" \"on my way\" ((\"Mark Eichin\" NIL \"eichin\" \"gmail.com\")' before -- ') ((\"Mark Eichin\" NIL \"eichin\" \"gmail.com\")) ((\"Mark Eichin\" NIL \"eichin\" \"gmail.com\")) ((\"Other Person\" NIL \"...\" \"...\")) NIL NIL NIL \"<f2e30b5f04071612593d641920@mail.gmail.com>\")' remains\n    \n\n(email address parts elided from one of the strings, but the match has already failed at that point.  Also, this is with strict_finditer tweaked as-shown so you can see the successful part of the match as well as the failed part...)\n\nIt appears that this is what keeps fetch(1, (\"ALL\",)) from working, as well, it hits the !ValueError in the same place at least, and the other parts of ALL work when fetched individually.\n\n    ----------------------------------------\n    - Bitbucket: https://bitbucket.org/mjs0/imapclient/issue/29\n    - Originally reported by: Anonymous\n    - Originally created at: 2009-12-20T04:40:26\n    "},"comment":{"url":"https://api.github.com/repos/mjs/imaptest/issues/comments/162090983","html_url":"https://github.com/mjs/imaptest/issues/78#issuecomment-162090983","issue_url":"https://api.github.com/repos/mjs/imaptest/issues/78","id":162090983,"user":{"login":"mjs","id":14993,"avatar_url":"https://avatars.githubusercontent.com/u/14993?v=3","gravatar_id":"","url":"https://api.github.com/users/mjs","html_url":"https://github.com/mjs","followers_url":"https://api.github.com/users/mjs/followers","following_url":"https://api.github.com/users/mjs/following{/other_user}","gists_url":"https://api.github.com/users/mjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjs/subscriptions","organizations_url":"https://api.github.com/users/mjs/orgs","repos_url":"https://api.github.com/users/mjs/repos","events_url":"https://api.github.com/users/mjs/events{/privacy}","received_events_url":"https://api.github.com/users/mjs/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T21:46:50Z","updated_at":"2015-12-04T21:46:50Z","body":"Tests added in 5ea0fc2ddb18\n\n----------------------------------------\nOriginal comment by: Menno Smits\n"}}