error | Python 3.3.2: /usr/bin/python3 Mon Mar 27 19:52:55 2023 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/afs/athena.mit.edu/user/y/o/yorai/web_scripts/freeFoodAPI/get.py in |
107 |
108 # get the message: |
=> 109 con = auth(user,password,imap_url) |
110 con.select('INBOX') |
111 message = getLatestEmail(con) |
con undefined, auth = <function auth>, user = 'freefoodapi@gmail.com', password = 'foodAPI2018', imap_url = 'imap.gmail.com' |
/afs/athena.mit.edu/user/y/o/yorai/web_scripts/freeFoodAPI/get.py in auth(user='freefoodapi@gmail.com', password='foodAPI2018', imap_url='imap.gmail.com') |
19 def auth(user,password,imap_url): |
20 con = imaplib.IMAP4_SSL(imap_url) |
=> 21 con.login(user,password) |
22 return con |
23 |
con = <imaplib.IMAP4_SSL object>, con.login = <bound method IMAP4_SSL.login of <imaplib.IMAP4_SSL object>>, user = 'freefoodapi@gmail.com', password = 'foodAPI2018' |
/usr/lib64/python3.3/imaplib.py in login(self=<imaplib.IMAP4_SSL object>, user='freefoodapi@gmail.com', password='foodAPI2018') |
524 typ, dat = self._simple_command('LOGIN', user, self._quote(password)) |
525 if typ != 'OK': |
=> 526 raise self.error(dat[-1]) |
527 self.state = 'AUTH' |
528 return typ, dat |
self = <imaplib.IMAP4_SSL object>, self.error = <class 'imaplib.IMAP4.error'>, dat = [b'[AUTHENTICATIONFAILED] Invalid credentials (Failure)'] |
error: b'[AUTHENTICATIONFAILED] Invalid credentials (Failure)'
args =
(b'[AUTHENTICATIONFAILED] Invalid credentials (Failure)',)
with_traceback =
<built-in method with_traceback of error object>