-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[master/cffi] AttributeError: 'Thread' object has no attribute 'get_toplevel_messages' #1590
Comments
As far as I can tell the More investigation needed. |
This seems to fix it: --- a/alot/db/thread.py
+++ b/alot/db/thread.py
@@ -47,8 +47,8 @@ class Thread:
subject = thread.subject
elif subject_type == 'oldest':
try:
- first_msg = list(thread.get_toplevel_messages())[0]
- subject = first_msg.get_header('subject')
+ first_msg = list(thread.toplevel())[0]
+ subject = first_msg.header('subject')
except IndexError:
subject = ''
self._subject = subject |
Awesome thanks for the guidance. |
Thanks - that's confirmed working here. Now spotted more behaviour changes on master but those are certainly separate. @mmartin Will you submit that as PR/Patch? or would you prefer I do it, and if so - how would you like your 'Suggested-by: <>' tag to appear for credit if I do it... |
@kbingham Go ahead and you do it, no need for “Suggested-by” tag. |
Aha - the notmuch2 bindings are documented as the notmuch bindings ;-) That's why I couldn't find them. I was looking for something specific as 'notmuch2' but they're now just the expected notmuch python bindings! https://notmuchmail.org/doc/latest/python-bindings.html So we have
PR submitted at #1591 |
Fixed with #1591 |
Before you submit a bug report, please make sure that the issue still exists on the master branch!
Describe the bug
Attempting to run alot with the latest master branch fails with "AttributeError: 'Thread' object has no attribute 'get_toplevel_messages'"
(python trace below).
git bisect brings it to:
de51016 is the first bad commit
alot: Import the
notmuch2
bindingsHowever, the resulting error is actually different at that point and fails with:
AttributeError: 'Database' object has no attribute 'create_query'
But I can not run any commit beyond "import the notmuch2" commit.
Software Versions
To Reproduce
Steps to reproduce the behaviour:
check out sources at relevant point
python3 -m alot
However, some investigations makes it look like this might be specific to a config option I have set:
So perhaps others don't hit this if they don't have that set. (I thought that was the obvious choice to set it to though ... )
Error Log
The text was updated successfully, but these errors were encountered: