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
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
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