jamesridgway/attachment-downloader

Does not login to IMAP server (Google)

Evoplatypus opened this issue · 3 comments

Trying to set this up for a family member. This is the results of the log file.

2022-05-31 22:01:45,253 - INFO - Attachment Downloader - Version: 1.2.3 (Python: 3.7.3), OS: (Release: 5.10.103-v7+, Platform: Linux-5.10.103-v7$2022-05-31 22:01:45,272 - INFO - Logging in to: 'imap.gmail.com' as 'xxx@gmail.com'
Traceback (most recent call last):
File "/home/xxx/.local/bin/attachment-downloader", line 86, in
starttls=starttls)
File "/home/xxx/.local/lib/python3.7/site-packages/imbox/imbox.py", line 35, in init
self.connection = self.server.connect(username, password)
File "/home/xxx/.local/lib/python3.7/site-packages/imbox/imap.py", line 33, in connect
self.server.login(username, password)
File "/usr/lib/python3.7/imaplib.py", line 596, in login
typ, dat = self._simple_command('LOGIN', user, self._quote(password))
File "/usr/lib/python3.7/imaplib.py", line 1196, in _simple_command
return self._command_complete(name, self._command(name, *args))
File "/usr/lib/python3.7/imaplib.py", line 960, in _command
arg = bytes(arg, self._encoding)
UnicodeEncodeError: 'ascii' codec can't encode character '\u201c' in position 1: ordinal not in range(128)

Well, that all but took me 2 minutes after posting to figure it out. The guide I was following had the password in quotes, and I had mine the same. Now I am getting a different error and will try to figure that out (authentication).

Ok. Last thing. I couldn't figure out how to get gmail to just work, but after making an App Password it does. So thank you for the app. I'm going to leave this up in case anyone else googles it, and if there is a way for me to use it without two factor authentication, please let me know, otherwise I think I got it to work how I wanted.

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.