Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mmehnert opened this issue Feb 17, 2024 · 5 comments
Labels
question Further information is requested

Comments

@mmehnert
Copy link

I get the following error running a synchronization.

General informations

  • system/distribution (with version): Debian GNU/Linux trixie/sid
  • offlineimap version (offlineimap -V): 8.0.0
  • Python version: 3.11.7
  • CLI options: none / imap server sync to maildir folder configured in .offlineimaprc

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
Copy link
Member

thekix commented Aug 17, 2024

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

@thekix thekix added the question Further information is requested label Aug 17, 2024
@Mark-Sol111
Copy link

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
Copy link
Author

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
Copy link
Member

thekix commented Aug 18, 2024

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants