afewmail / afew

an initial tagging script for notmuch mail
ISC License
325 stars 97 forks source link

Error run afew -tn #322

Closed mrunhap closed 2 years ago

mrunhap commented 2 years ago
Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/configparser.py", line 789, in get
    value = d[option]
  File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/collections/__init__.py", line 941, in __getitem__
    return self.__missing__(key)            # support subclasses that define __missing__
  File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/collections/__init__.py", line 933, in __missing__
    raise KeyError(key)
KeyError: 'tags'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/afew", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/afew/commands.py", line 120, in main
    query_string = get_notmuch_new_query()
  File "/usr/local/lib/python3.9/site-packages/afew/NotmuchSettings.py", line 32, in get_notmuch_new_query
    return '(%s)' % ' AND '.join('tag:%s' % tag for tag in get_notmuch_new_tags())
  File "/usr/local/lib/python3.9/site-packages/afew/NotmuchSettings.py", line 28, in get_notmuch_new_tags
    return filter(lambda x: x != 'unread', notmuch_settings.get_list('new', 'tags'))
  File "/usr/local/lib/python3.9/site-packages/afew/configparser.py", line 12, in get_list
    for value in self.get(section, key).split(delimiter))
  File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/configparser.py", line 792, in get
    raise NoOptionError(option, section)
configparser.NoOptionError: No option 'tags' in section: 'new'

System is macOS 12.0.1 (x86) Install afew via pip3 install afew

And notmuch installed by brew install notmuch (no option --with-python3, maybe doc should update?)

mrunhap commented 2 years ago

https://afew.readthedocs.io/en/latest/configuration.html#notmuch-config