Here is a sample that trigger the bug : """ import notmuch db = notmuch.Database() query = db.create_query("tag:inbox") for m in query.search_messages(): len(m.get_tags()) """ --- bindings/python/notmuch/tag.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/python/notmuch/tag.py b/bindings/python/notmuch/tag.py index 65a9118..2f82c1a 100644 --- a/bindings/python/notmuch/tag.py +++ b/bindings/python/notmuch/tag.py @@ -116,8 +116,8 @@ class Tags(object): raise NotmuchError(STATUS.NOT_INITIALIZED) i=0 - while nmlib.notmuch_tags_valid(self._msgs): - nmlib.notmuch_tags_move_to_next(self._msgs) + while nmlib.notmuch_tags_valid(self._tags): + nmlib.notmuch_tags_move_to_next(self._tags) i += 1 self._tags = None return i -- 1.7.6