imapbackup icon indicating copy to clipboard operation
imapbackup copied to clipboard

icloud: AttributeError: 'int' object has no attribute 'strip'

Open paulhargreaves opened this issue 3 years ago • 3 comments

Connecting to 'imap.mail.me.com' TCP port 993, SSL
Logging in as '<user>'
Finding Folders /() "/" "CARS"
<snip_many_more_folders>
Finding Folders: 81 folders
Folder "CARS": 
70 messages
File CARS.mbox: 1 messages
Downloading 70 new messages to CARS.mbox |Traceback (most recent call last):
  File "imapbackup/imapbackup38.py", line 793, in <module>
    main()
  File "imapbackup/imapbackup38.py", line 714, in main
    download_messages(server, filename, new_messages, config['overwrite'], config['nospinner'], config['thunderbird'], basedir)
  File "imapbackup/imapbackup38.py", line 182, in download_messages
    text_bytes = data_bytes.strip().replace(b'\r', b'')
AttributeError: 'int' object has no attribute 'strip'

python 3.10.6 Linux ripper 5.19.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 05 Sep 2022 18:09:09 +0000 x86_64 GNU/Linux

paulhargreaves avatar Sep 11 '22 15:09 paulhargreaves

Hi there!

Thanks for reporting this. It seems that the IMAP libraries in Python 3.10 have changed slightly.

I don't have the bandwidth to fix this right now, but would welcome a pull request with a Python 3.10 specific file.

rcarmo avatar Sep 11 '22 16:09 rcarmo

Hello!

I did a quick diff of imaplib between 3.8 and 3.10 but didn't see anything obvious that would have caused an issue.

So then I installed python3.8 and ran python3.8 imapbackup/imapbackup38.py <opts>

Same error.

paulhargreaves avatar Sep 11 '22 20:09 paulhargreaves

That’s weird. The 3.8 version was contributed and tested as working. I wonder…

rcarmo avatar Sep 12 '22 07:09 rcarmo

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Dec 12 '22 02:12 github-actions[bot]

This issue was closed because it has been inactive for 30 days since being marked as stale.

github-actions[bot] avatar Jan 12 '23 02:01 github-actions[bot]