Re: Error running mail GMAIL

43 views
Skip to first unread message
Message has been deleted

Quinten De Wilde

unread,
Dec 5, 2017, 5:25:48 PM12/5/17
to Pattern
If I only do the first line as:

gmail = Mail(username='username', password='pass', service=GMAIL)


I get this error, though I have disabled my gmail, security settings. 

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/quinten/anaconda2/lib/python2.7/site-packages/pattern/web/imap/__init__.py", line 115, in __init__
    self.login(username, password)
  File "/home/quinten/anaconda2/lib/python2.7/site-packages/pattern/web/imap/__init__.py", line 137, in login
    raise MailLoginError
pattern.web.imap.MailLoginError


Op donderdag 30 november 2017 23:14:37 UTC+1 schreef Quinten De Wilde:

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
Message has been deleted

Quinten De Wilde

unread,
Dec 5, 2017, 5:41:18 PM12/5/17
to Pattern
Same on my laptop, somebody any idea?

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/usr/local/lib/python2.7/site-packages/pattern/web/imap/__init__.py", line 115, in __init__

    self.login(username, password)

  File "/usr/local/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 "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/imaplib.py", line 194, in __init__

    self.welcome = self._get_response()

  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/imaplib.py", line 929, in _get_response

    resp = self._get_line()

  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/imaplib.py", line 1029, in _get_line

Reply all
Reply to author
Forward
0 new messages