OfflineIMAP / offlineimap3

Read/sync your IMAP mailboxes (python3)
Other
450 stars 64 forks source link

TypeError: decoding with '136' codec failed (TypeError: utf7m_decode() takes 1 positional argument but 2 were given) #183

Open mmehnert opened 8 months ago

mmehnert commented 8 months ago

I get the following error running a synchronization.

General informations

Configuration file offlineimaprc

[Account mailbox]
localrepository = mailbox-loc
remoterepository = mailbox

[Repository mailbox-loc]
type = Maildir
localfolders = ~/OfflineImap/mailbox
sync_deletes = no

[Repository mailbox]
type = IMAP
remotehost = imap.some-domain.org
remoteuser = user
remotepass = password
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
readonly = True

Logs, error

ERROR: Exceptions occurred during the run!
ERROR: offlineimap.error.OfflineImapError: Exception parsing message with ID (<some message id>) from imaplib (response type: bytes).
 TypeError: decoding with '136' codec failed (TypeError: utf7m_decode() takes 1 positional argument but 2 were given)

Traceback:
  File "/usr/share/offlineimap3/offlineimap/folder/Base.py", line 823, in copymessageto
    message = self.getmessage(uid)
              ^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/offlineimap3/offlineimap/folder/IMAP.py", line 343, in getmessage
    data = self._fetch_from_imap(str(uid), self.retrycount)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/offlineimap3/offlineimap/folder/IMAP.py", line 910, in _fetch_from_imap
    raise OfflineImapError(
thekix commented 2 months ago

Hi @mmehnert

Sorry for the delay. The problem is related to a codification in some email. Do you have the error yet? Could you try with the latest version in the git?

Regards, kix

Mark-Sol111 commented 2 months ago

Hi @mmehnert

Sorry for the delay. The problem is related to a codification in some email. Do you have the error yet? Could you try with the latest version in the git?

Regards, kix

Hi @thekix I still have same issue TypeError: utf7m_decode() takes 1 positional argument but 2 were given

Traceback: File "/opt/homebrew/Cellar/offlineimap/8.0.0_2/libexec/lib/python3.12/site-packages/offlineimap/folder/Base.py", line 810, in copymessageto message = self.getmessage(uid) ^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/offlineimap/8.0.0_2/libexec/lib/python3.12/site-packages/offlineimap/folder/IMAP.py", line 343, in getmessage data = self._fetch_from_imap(str(uid), self.retrycount) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/offlineimap/8.0.0_2/libexec/lib/python3.12/site-packages/offlineimap/folder/IMAP.py", line 910, in _fetch_from_imap raise OfflineImapError(

can't install OfflineIMAP according doc here https://www.offlineimap.org/doc/installation.html#git

mmehnert commented 2 months ago

Hi @mmehnert

Sorry for the delay. The problem is related to a codification in some email. Do you have the error yet? Could you try with the latest version in the git?

I'm sorry. After the problems I switched to a different solution and I can't remember which account / setup the problem occurred with any more.

thekix commented 2 months ago

Hi @mmehnert

can't install OfflineIMAP according doc here https://www.offlineimap.org/doc/installation.html#git

Could you your this commands:

git clone https://github.com/OfflineIMAP/offlineimap3.git
cd offlineimap3
python offlineimap.py

This commands will clone the git repo in the offlineimap3 folder. Then you can run offlineimap using python (or python3).

Thanks a lot. kix.

mmehnert commented 1 month ago

sorry, I can't reproduce since I have since deleted the config / don't use OfflineIMAP anymore.