Agile_Data_Code icon indicating copy to clipboard operation
Agile_Data_Code copied to clipboard

resetting imap for ABORT while running gmail.py

Open poiuytrez opened this issue 10 years ago • 2 comments

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.

poiuytrez avatar Apr 11 '14 18:04 poiuytrez

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

rodcloutier avatar Apr 15 '14 03:04 rodcloutier

I am getting this error: command: FETCH => socket error: EOF

poiuytrez avatar Apr 16 '14 14:04 poiuytrez