Package: offlineimap Version: 7.3.3+dfsg1-1+0.0~git20230519.c9f44ad+dfsg-1 Severity: important
After an upgrade on testing which included python3-pyparsing, I got this error while trying to download from an outlook.office365.com imap server using M365-IMAP (https://github.com/UvA-FNWI/M365-IMAP) While attempting to sync account 'xxxxxx' urllib.error.HTTPError: HTTP Error 400: Bad Request =============================================================================== Traceback: File "/usr/share/offlineimap3/offlineimap/accounts.py", line 298, in syncrunner self.__sync() File "/usr/share/offlineimap3/offlineimap/accounts.py", line 375, in __sync remoterepos.getfolders() File "/usr/share/offlineimap3/offlineimap/repository/IMAP.py", line 681, in getfolders imapobj = self.imapserver.acquireconnection() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 593, in acquireconnection self.__authn_helper(imapobj) File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 445, in __authn_helper if func(imapobj): File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 379, in __authn_xoauth2 imapobj.authenticate('XOAUTH2', self.__xoauth2handler) File "/usr/lib/python3/dist-packages/imaplib2.py", line 691, in authenticate typ, dat = self._simple_command('AUTHENTICATE', mechanism.upper()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/imaplib2.py", line 1684, in _simple_command return self._command_complete(self._command(name, *args), kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/imaplib2.py", line 1404, in _command literal = literator(data, rqb) ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/imaplib2.py", line 2247, in process ret = self.mech(self.decode(data)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 249, in __xoauth2handler response = urllib.request.urlopen( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 216, in urlopen return opener.open(url, data, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 525, in open response = meth(req, response) ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 634, in http_response response = self.parent.error( ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 563, in error File "/usr/lib/python3.11/urllib/request.py", line 496, in _call_chain result = func(*args) ^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 643, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) ERROR: AttributeError: 'str' object has no attribute '__suppress_context__' ============================================================================== I see that M365-IMAP uses urllibparse so this may be an M365-IMAP bug. I will report that on the gitlab repository. ael -- System Information: Debian Release: trixie/sid APT prefers testing-debug APT policy: (500, 'testing-debug'), (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.4.0-3-amd64 (SMP w/8 CPU threads; PREEMPT) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages offlineimap depends on: ii offlineimap3 0.0~git20230519.c9f44ad+dfsg-1 offlineimap recommends no packages. offlineimap suggests no packages. -- no debconf information