gauteh / lieer

Fast email-fetching and sending and two-way tag synchronization between notmuch and GMail
http://lieer.gaute.vetsj.com
Other
494 stars 60 forks source link

module 'notmuch2' has no attribute 'Database' #262

Closed RobinBeekhof closed 4 months ago

RobinBeekhof commented 6 months ago

When I run gmi sync I get the following error. This used to work fine before.

gmi sync Traceback (most recent call last): File "/opt/homebrew/bin/gmi", line 24, in <module> g.main () File "/opt/homebrew/lib/python3.11/site-packages/lieer/gmailieer.py", line 234, in main args.func (args) File "/opt/homebrew/lib/python3.11/site-packages/lieer/gmailieer.py", line 305, in sync self.setup (args, args.dry_run, True) File "/opt/homebrew/lib/python3.11/site-packages/lieer/gmailieer.py", line 301, in setup self.local.load_repository (block) File "/opt/homebrew/lib/python3.11/site-packages/lieer/local.py", line 330, in load_repository with notmuch2.Database () as db: ^^^^^^^^^^^^^^^^^ AttributeError: module 'notmuch2' has no attribute 'Database'

notmuch itself works fine, do you have any idea what could cause this error?

mjg commented 5 months ago

Have you updated your notmuch installation recently? The new (cuurent) python bindings of notmuch definitely should contain that. You can try with

import notmuch2
'Database' in dir(notmuch2)

from a python prompt. Then, db = notmuch2.Database() should give you the default database object at path db.default_path() etc. If this does not work then your notmuch bindings are at fault.

gauteh commented 4 months ago

Think this is a notmuch -> notmuch2 issue.