-
-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
IMAP4 protocol error - cannot use a bytes pattern on a string-like object #721
Comments
Same here, after changing python from 2.9 to 3.9 and reinstalling offlineimap I get the same error on Gentoo (.offlineimaprc did not change). Version: |
This version of OfflineIMAP is compatible only with Python 2 You can find the Python 3 version here : |
Really @mbucas ? The @valir or @robertvalik , did either of you diagnose this? I'm getting the same error (and on a quite different setup: on macos, with offlineimap set up for oauth). UPDATE: just confirmed that I'm getting this identical error despite using offlineimap3 (this build) |
I was getting this issue with the Since all three of us reporting this issue had it on |
@enfascination mcubas did point out that this repo is for older offlineimap for python2 and not for the py3 offlineimap. After that I have opened an issue in the offlineimap3 repo - issue 133 and I have abandoned it after migrating to isync. |
General informations
offlineimap -V
): offlineimap v7.3.4, imaplib2 v2.101 (bundled), Python v3.10.5, OpenSSL 1.1.1o 3 May 2022Configuration file offlineimaprc
[general]
accounts = intel
[Account intel]
localrepository = intel-local
remoterepository = intel-remote
[Repository intel-local]
type = Maildir
localfolders = ~/Mail/intel
[Repository intel-remote]
type = IMAP
starttls = no
ssl = no
remotehost = localhost
remoteport = 1143
remoteuser = valir
remotepass = somePassword
auth_mechanisms = LOGIN
maxconnections = 3
[mbnames]
enabled = yes
filename =
/.mutt/mailboxes/Mail/movidius/%(foldername)s"header = "mailboxes "
peritem = "+%(accountname)s/%(foldername)s"
#peritem = "
sep = " "
footer = "\n"
pythonfile (if any)
no python file
Logs, error
$ offlineimap 130 ↵
OfflineIMAP 7.3.4
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.101 (bundled), Python v3.10.5, OpenSSL 1.1.1o 3 May 2022
Account sync intel:
*** Processing account intel
Establishing connection to localhost:1143 (intel-remote)
ERROR: While attempting to sync account 'intel'
IMAP4 protocol error: program error: <class 'TypeError'> - cannot use a bytes pattern on a string-like object
*** Finished account 'intel' in 0:00
ERROR: can't have text and binary mode at once
ERROR: Exceptions occurred during the run!
ERROR: While attempting to sync account 'intel'
IMAP4 protocol error: program error: <class 'TypeError'> - cannot use a bytes pattern on a string-like object
Traceback:
File "/home/vrusu/.local/lib/python3.10/site-packages/offlineimap/accounts.py", line 293, in syncrunner
self.__sync()
File "/home/vrusu/.local/lib/python3.10/site-packages/offlineimap/accounts.py", line 372, in __sync
remoterepos.getfolders()
File "/home/vrusu/.local/lib/python3.10/site-packages/offlineimap/repository/IMAP.py", line 452, in getfolders
imapobj = self.imapserver.acquireconnection()
File "/home/vrusu/.local/lib/python3.10/site-packages/offlineimap/imapserver.py", line 574, in acquireconnection
imapobj = imaplibutil.WrappedIMAP4(
File "/home/vrusu/.local/lib/python3.10/site-packages/offlineimap/imaplibutil.py", line 237, in init
IMAP4.init(self, *args, **kwargs)
File "/home/vrusu/.local/lib/python3.10/site-packages/offlineimap/bundled_imaplib2.py", line 399, in init
self.welcome = self._request_push(name='welcome', tag='continuation').get_response('IMAP4 protocol error: %s')[1]
File "/home/vrusu/.local/lib/python3.10/site-packages/offlineimap/bundled_imaplib2.py", line 200, in get_response
raise typ(exc_fmt % str(val))
ERROR: can't have text and binary mode at once
Steps to reproduce the error
This is a fresh install, on a newly installed system, so:
The text was updated successfully, but these errors were encountered: