Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resetting imap for ABORT while running gmail.py #29

Open
poiuytrez opened this issue Apr 11, 2014 · 2 comments
Open

resetting imap for ABORT while running gmail.py #29

poiuytrez opened this issue Apr 11, 2014 · 2 comments

Comments

@poiuytrez
Copy link

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.

@rodcloutier
Copy link

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

@poiuytrez
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants