Estou configurando um novo computador e instalei offlineimap
com pip install --user offlineimap
, mas quando tento executá-lo estou recebendo uma série de erros porque o offlineimap não suporta o Python3:
link
Eu tenho 2.7 instalado assim como 3:
amanda@host:~$ python --version
Python 2.7.15rc1
mas mesmo assim não sei como forçar o offlineimap a usá-lo.
Por link , desinstalei e tentei reinstalar, especificando a versão do python, mas isso está sufocando de uma maneira especial:
amanda@host:~$ python2.7 ~/.local/bin/pip install --user offlineimap
Traceback (most recent call last):
File "/home/amanda/.local/bin/pip", line 7, in <module>
from pip._internal import main
ImportError: No module named pip._internal
O erro completo do OfflineIMAP:
OfflineIMAP 7.2.1
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.57 (bundled), Python v3.6.5, OpenSSL 1.1.0g 2 Nov 2017
Account sync Example:
*** Processing account Example
Establishing connection to mail.example.info:993 (VelRemote)
ERROR: While attempting to sync account 'Example'
IMAP4 protocol error: program error: <class 'TypeError'> - cannot use a bytes pattern on a string-like object
*** Finished account 'Example' in 0:00
ERROR: Exceptions occurred during the run!
ERROR: While attempting to sync account 'Example'
IMAP4 protocol error: program error: <class 'TypeError'> - cannot use a bytes pattern on a string-like object
Traceback:
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/accounts.py", line 283, in syncrunner
self.__sync()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/accounts.py", line 359, in __sync
remoterepos.getfolders()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/repository/IMAP.py", line 452, in getfolders
imapobj = self.imapserver.acquireconnection()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/imapserver.py", line 547, in acquireconnection
af=self.af,
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/imaplibutil.py", line 194, in __init__
super(WrappedIMAP4_SSL, self).__init__(*args, **kwargs)
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 2183, in __init__
IMAP4.__init__(self, host, port, debug, debug_file, identifier, timeout, debug_buf_lvl)
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 400, in __init__
self.welcome = self._request_push(name='welcome', tag='continuation').get_response('IMAP4 protocol error: %s')[1]
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 201, in get_response
raise typ(exc_fmt % str(val))