OfflineIMAP / offlineimap3

Read/sync your IMAP mailboxes (python3)
Other
449 stars 62 forks source link

assert sqlite.threadsafety == 1, 'Your sqlite is not multithreading safe.' #144

Open generateui opened 1 year ago

generateui commented 1 year ago

General informations

I did a brew install on a MacOS with M2 chip. I copied the config from another (working) instance, and I got:

😎 /Users/ruud❱offlineimap -f Folder -a accountname
OfflineIMAP 8.0.0
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v3.06, Python v3.11.2, OpenSSL 1.1.1t  7 Feb 2023
Account sync accountname:
 *** Processing account accountname
 Establishing connection to imap.gmail.com:993 (gmail)
Folder Reviews [acc: accountname]:
 ERROR: ERROR in syncfolder for accountname folder Reviews: Traceback (most recent call last):
  File "/opt/homebrew/Cellar/offlineimap/8.0.0_1/libexec/lib/python3.11/site-packages/offlineimap/accounts.py", line 610, in syncfolder
    statusfolder.openfiles()
  File "/opt/homebrew/Cellar/offlineimap/8.0.0_1/libexec/lib/python3.11/site-packages/offlineimap/folder/LocalStatusSQLite.py", line 108, in openfiles
    assert sqlite.threadsafety == 1, 'Your sqlite is not multithreading safe.'
           ^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Your sqlite is not multithreading safe.

  Your sqlite is not multithreading safe.
Account sync accountname:
 *** Finished account 'accountname' in 0:00
ERROR: Exceptions occurred during the run!
ERROR: ERROR in syncfolder for accountname folder Reviews: Traceback (most recent call last):
  File "/opt/homebrew/Cellar/offlineimap/8.0.0_1/libexec/lib/python3.11/site-packages/offlineimap/accounts.py", line 610, in syncfolder
    statusfolder.openfiles()
  File "/opt/homebrew/Cellar/offlineimap/8.0.0_1/libexec/lib/python3.11/site-packages/offlineimap/folder/LocalStatusSQLite.py", line 108, in openfiles
    assert sqlite.threadsafety == 1, 'Your sqlite is not multithreading safe.'
           ^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Your sqlite is not multithreading safe.

I deleted the assertion and now it works fine. Iirc I did this in the past too, but didn't bother to file an issue.

Dima-369 commented 1 year ago

Same for me. There was a recent MR about this though: https://github.com/OfflineIMAP/offlineimap3/pull/139

I also deleted the assertion and it works fine for me.

WhyNotHugo commented 1 year ago

Fixed in https://github.com/OfflineIMAP/offlineimap3/pull/139

The fix is unreleased, see: https://github.com/OfflineIMAP/offlineimap3/issues/151

ZhongRuoyu commented 2 months ago

The offlineimap formula on Homebrew has been updated to include the fix (#139). Affected Homebrew users can now run brew update && brew upgrade offlineimap.