{"action":"created","issue":{"url":"https://api.github.com/repos/rjurney/Agile_Data_Code/issues/28","labels_url":"https://api.github.com/repos/rjurney/Agile_Data_Code/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/rjurney/Agile_Data_Code/issues/28/comments","events_url":"https://api.github.com/repos/rjurney/Agile_Data_Code/issues/28/events","html_url":"https://github.com/rjurney/Agile_Data_Code/issues/28","id":30958989,"number":28,"title":"error (imaplib.error) occurs when try to run gmail.py ","user":{"login":"JamesGetexp","id":7201080,"avatar_url":"https://avatars.githubusercontent.com/u/7201080?v=3","gravatar_id":"","url":"https://api.github.com/users/JamesGetexp","html_url":"https://github.com/JamesGetexp","followers_url":"https://api.github.com/users/JamesGetexp/followers","following_url":"https://api.github.com/users/JamesGetexp/following{/other_user}","gists_url":"https://api.github.com/users/JamesGetexp/gists{/gist_id}","starred_url":"https://api.github.com/users/JamesGetexp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JamesGetexp/subscriptions","organizations_url":"https://api.github.com/users/JamesGetexp/orgs","repos_url":"https://api.github.com/users/JamesGetexp/repos","events_url":"https://api.github.com/users/JamesGetexp/events{/privacy}","received_events_url":"https://api.github.com/users/JamesGetexp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-04-07T05:27:56Z","updated_at":"2015-07-30T21:26:22Z","closed_at":null,"body":"Follow instruction in chapter 3 to run $ ./gmail.py -m automatic -u xxxxxxx@gmail.com -p 'xxxxxx' -s ./email.avro.schema -f '[Gmail]/All Mail' -o /tmp/my_inbox_directory 2>&1 &\r\n\r\nTo get data from gmail, here is the error:\r\n\r\n$ Timeout exception occurred!\r\nWarning: /tmp/my_inbox_directory already exists:\r\nWarning: /tmp/my_inbox_directorytmp already exists:\r\nTraceback (most recent call last):\r\n  File \"./gmail.py\", line 104, in <module>\r\n    main()\r\n  File \"./gmail.py\", line 85, in main\r\n    status, count = slurper.init_folder(imap_folder)\r\n  File \"/home/james/training/ADS/gmail/gmail_slurper.py\", line 68, in init_folder\r\n    status, count = self.imap.select(folder)\r\n  File \"/usr/lib/python2.7/imaplib.py\", line 649, in select\r\n    typ, dat = self._simple_command(name, mailbox)\r\n  File \"/usr/lib/python2.7/imaplib.py\", line 1070, in _simple_command\r\n    return self._command_complete(name, self._command(name, *args))\r\n  File \"/usr/lib/python2.7/imaplib.py\", line 825, in _command\r\n    ', '.join(Commands[name])))\r\nimaplib.error: command SELECT illegal in state NONAUTH, only allowed in states AUTH, SELECTED\r\n\r\nany idea?"},"comment":{"url":"https://api.github.com/repos/rjurney/Agile_Data_Code/issues/comments/126495343","html_url":"https://github.com/rjurney/Agile_Data_Code/issues/28#issuecomment-126495343","issue_url":"https://api.github.com/repos/rjurney/Agile_Data_Code/issues/28","id":126495343,"user":{"login":"AndrewMLewis","id":4745999,"avatar_url":"https://avatars.githubusercontent.com/u/4745999?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewMLewis","html_url":"https://github.com/AndrewMLewis","followers_url":"https://api.github.com/users/AndrewMLewis/followers","following_url":"https://api.github.com/users/AndrewMLewis/following{/other_user}","gists_url":"https://api.github.com/users/AndrewMLewis/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewMLewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewMLewis/subscriptions","organizations_url":"https://api.github.com/users/AndrewMLewis/orgs","repos_url":"https://api.github.com/users/AndrewMLewis/repos","events_url":"https://api.github.com/users/AndrewMLewis/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewMLewis/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T21:26:22Z","updated_at":"2015-07-30T21:26:22Z","body":"I found that even if it already said the language was English(United States) I needed to go in and set it explicitly.  If you are carrying the default, even if it looks correct, gmail.py still blows up.\r\n"}}