clips / clips/pattern

Imaplib error? EOF error?

Open
#199 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.9k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Hi, when I run following code on either my linux ubuntu or my raspberry pi I get the following error?

On ubuntu zesty 17.04

from pattern.web import Mail, GMAIL, SUBJECT

gmail = Mail(username='username', password='password', service=GMAIL, port=993, secure=False)
print gmail.folders.keys()

['drafts', 'spam', 'personal', 'work', 'inbox', 'mail', 'starred', 'trash']

python test.py
Traceback (most recent call last):
  File "test.py", line 7, in <module>
    gmail = Mail(username='username', password='password', service=GMAIL, port=993, secure=False)
  File "/home/myname/anaconda2/lib/python2.7/site-packages/pattern/web/imap/__init__.py", line 115, in __init__
    self.login(username, password)
  File "/home/myname/anaconda2/lib/python2.7/site-packages/pattern/web/imap/__init__.py", line 133, in login
    self._imap4 = (self._secure and IMAP4_SSL or IMAP4)(self._host, self._port)
  File "/home/myname/anaconda2/lib/python2.7/imaplib.py", line 194, in __init__
    self.welcome = self._get_response()
  File "/home/myname/anaconda2/lib/python2.7/imaplib.py", line 931, in _get_response
    resp = self._get_line()
  File "/home/myname/anaconda2/lib/python2.7/imaplib.py", line 1031, in _get_line
    raise self.abort('socket error: EOF')
imaplib.abort: socket error: EOF

On RPi

same input

python test.py
Traceback (most recent call last):
  File "test.py", line 7, in <module>
    gmail = Mail(username='username', password='password', service=GMAIL, port=993, secure=False)
  File "/usr/local/lib/python2.7/dist-packages/pattern/web/imap/__init__.py", line 115, in __init__
    self.login(username, password)
  File "/usr/local/lib/python2.7/dist-packages/pattern/web/imap/__init__.py", line 133, in login
    self._imap4 = (self._secure and IMAP4_SSL or IMAP4)(self._host, self._port)
  File "/usr/lib/python2.7/imaplib.py", line 193, in __init__
    self.welcome = self._get_response()
  File "/usr/lib/python2.7/imaplib.py", line 928, in _get_response
    resp = self._get_line()
  File "/usr/lib/python2.7/imaplib.py", line 1028, in _get_line
    raise self.abort('socket error: EOF')
imaplib.abort: socket error: EOF

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the Python 2 examples on Ubuntu or the Raspberry Pi, then inspect pattern/web/imap/init.py at the Mail constructor and login call alongside Python's imaplib connection handling. Determine the relevant configuration or compatibility problem and verify the result by rerunning test.py without the socket EOF error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.