A typo in Database._create_query loses the exclude_tag names during the string to utf-8 conversion. The problem is fixed by this patch applied to current master (ced341e8): diff --git i/bindings/python-cffi/notmuch2/_database.py w/bindings/python-cffi/notmuch2/_database.py index 5ab0f20a..868f4408 100644 --- i/bindings/python-cffi/notmuch2/_database.py +++ w/bindings/python-cffi/notmuch2/_database.py @@ -581 +581 @@ class Database(base.NotmuchObject): - tag = str.encode('utf-8') + tag = tag.encode('utf-8') -- johs (Johannes Larsen), (+47) 41435451