Agile_Data_Code
Agile_Data_Code copied to clipboard
resetting imap for ABORT while running gmail.py
Hello,
I am running this command to retrieve the gmail emails python gmail.py -m automatic -u [email protected] -p xxxxx -s email.avro.schema -f '[Gmail]/All Mail' -o outputgmail
but I am getting: Timeout exception occurred! Warning: outputgmail already exists: Warning: outputgmailtmp already exists: Folder '[Gmail]/All Mail' SELECT status: OK Folder '[Gmail]/All Mail has 63768' emails...
Connected to folder [Gmail]/All Mail and downloading 63768 emails...
resetting imap for ABORT Folder '[Gmail]/All Mail' SELECT status: OK Folder '[Gmail]/All Mail has 63768' emails...
IMAP RESET: OK 63768 resetting imap for ABORT Folder '[Gmail]/All Mail' SELECT status: OK Folder '[Gmail]/All Mail has 63768' emails...
IMAP RESET: OK 63768 resetting imap for ABORT Folder '[Gmail]/All Mail' SELECT status: OK Folder '[Gmail]/All Mail has 63768' emails...
IMAP RESET: OK 63768 resetting imap for ABORT Folder '[Gmail]/All Mail' SELECT status: OK Folder '[Gmail]/All Mail has 63768' emails...
(and it continues ...).
Any ideas of what's wrong? I have looked everywhere on internet and I have no clue of what's the issue.
Thank you.
Change this in gmail_slurper.py, line 88 to get some information on why it is bailing out.
try:
status, data = self.imap.fetch(str(email_id), '(X-GM-THRID RFC822)') # Gmail's X-GM-THRID will get the thread of the message
except self.TimeoutException:
return 'TIMEOUT', {}, None
except:
return 'ABORT', {}, None
to
try:
status, data = self.imap.fetch(str(email_id), '(X-GM-THRID RFC822)') # Gmail's X-GM-THRID will get the thread of the message
except self.TimeoutException:
return 'TIMEOUT', {}, None
except Exception as e:
print e
return 'ABORT', {}, None
I am getting this error: command: FETCH => socket error: EOF