Bug 1796406 - Clicking the "settings" button for Local mail results in python error
Summary: Clicking the "settings" button for Local mail results in python error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bubblemail
Version: 30
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-30 11:05 UTC by Stefan Assmann
Modified: 2020-02-08 02:01 UTC (History)
2 users (show)

Fixed In Version: bubblemail-0.4-3.fc30 bubblemail-0.4-3.fc31
Clone Of:
Environment:
Last Closed: 2020-02-08 01:38:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Stefan Assmann 2020-01-30 11:05:10 UTC
Description of problem:
The following error occurs when clicking on the settings button for Local mail.

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/__init__.py", line 29, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/rowwidget.py", line 91, in on_edit_clicked
    AccountDialog(self.caller, config=self.config)
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/accountdialog.py", line 96, in __init__
    self.init_account(account)
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/accountdialog.py", line 125, in init_account
    self.config.get_core(self.config.LOCAL_FOLDERS))
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/accountdialog.py", line 330, in append_folders
    for folder in folder_list:
TypeError: 'NoneType' object is not iterable


Version-Release number of selected component (if applicable):
bubblemail-0.4-1.fc30.x86_64

How reproducible:
always

Steps to Reproduce:
1. click settings button for Local mail
2.
3.

Actual results:
python error

Comment 1 Razer 2020-01-30 18:42:12 UTC
Thanks for the report.

Commit e23ed56f should fix it :
https://framagit.org/razer/bubblemail/commit/e23ed56fa10d35033fbe7fe3d64ae3b5fbea9769

Please wait until next release or build from git:
https://framagit.org/razer/bubblemail#install
https://framagit.org/razer/bubblemail#packaging

Best regards

Comment 2 Fedora Update System 2020-01-30 19:51:17 UTC
FEDORA-2020-454e781915 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-454e781915

Comment 3 Fedora Update System 2020-01-30 20:07:20 UTC
FEDORA-2020-14013cff17 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-14013cff17

Comment 4 Robert-André Mauchin 🐧 2020-01-30 20:14:05 UTC
Still doesn't work:

$ bubblemail
Gtk-Message: 21:08:50.356: Failed to load module "appmenu-gtk-module"
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/__init__.py", line 29, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/rowwidget.py", line 91, in on_edit_clicked
    AccountDialog(self.caller, config=self.config)
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/accountdialog.py", line 96, in __init__
    self.init_account(account)
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/accountdialog.py", line 127, in init_account
    local_folders)
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/accountdialog.py", line 333, in append_folders
    for folder in folder_list:
TypeError: 'NoneType' object is not iterable

Comment 5 Fedora Update System 2020-01-31 01:30:31 UTC
bubblemail-0.4-3.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-454e781915

Comment 6 Fedora Update System 2020-01-31 02:26:14 UTC
bubblemail-0.4-3.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-14013cff17

Comment 7 Stefan Assmann 2020-01-31 10:11:16 UTC
Hmm, I'm still getting the same error with the build from
https://bodhi.fedoraproject.org/updates/FEDORA-2020-454e781915

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/__init__.py", line 29, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/rowwidget.py", line 91, in on_edit_clicked
    AccountDialog(self.caller, config=self.config)
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/accountdialog.py", line 96, in __init__
    self.init_account(account)
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/accountdialog.py", line 127, in init_account
    local_folders)
  File "/usr/lib/python3.7/site-packages/bubblemail/ui/accountdialog.py", line 333, in append_folders
    for folder in folder_list:
TypeError: 'NoneType' object is not iterable

Am I missing something?

Comment 8 Razer 2020-01-31 14:59:49 UTC
No you're not missing anything.
I just point out another (real) bug not related to yours.

The only way I found to reproduce your bug is to have only a mbox as local mail.
In this case, the edit button must be insensitive since mbox doesn't support folders.
Actualy it's not, and I will solve that.

If your context differs, please expose it.

Regards

Comment 9 Stefan Assmann 2020-01-31 15:43:27 UTC
OK, that makes sense.
I have multiple local maildir folders, which I want to configure.
Btw, when clicking the "+" for adding a new account there's only a choice between pop3 and imap.
How can I add another local mailbox?

Comment 10 Razer 2020-01-31 16:17:44 UTC
Yeah, to be honest, I was wondering if working on better local mail support makes real sense, being not really sure if it will be used by someone nowdays. Fact is that some ugly bugs come through the developement cycle and tests, and thanks to you to point near them.

Technicaly speaking, considering local mail as one and only one account despite the presence of multiple maildir folders offers some kind of developement shortcuts until now, that should be reversed in the future (considering it useful for at least you right now). I just need some time to do so.

For the record, I have just commited some patches regarding the initial bug:
https://framagit.org/razer/bubblemail/commits/master

Cheers

Comment 11 Stefan Assmann 2020-01-31 16:27:11 UTC
Thanks for your support, really appreciated!
I think local mail is still a thing. Not everybody has a stable internet connection, especially when travelling.
Also a good number of people use offlineimap or isync to cache mail locally simply because it's faster.

So far I'm watching my maildir folders with inotify and generate desktop notifications via notify-send. It's a hack and I'd gladly switch to something better. :)

Comment 12 Razer 2020-01-31 16:35:03 UTC
Makes sence, this have to be done, one way or another (plugin...)

The other ugly fix I see is to run dovecot on your maildirs and create imap accounts with localhost as server in bubblemail
You can even create multiple accounts using multiple tcp ports or user account

Comment 13 Razer 2020-02-01 16:29:38 UTC
I actualy work on something that may fit your needs. I create a new branch for it, you can give it a try if you're a little familiar with git and not afraid of bugs and regressions. Obviously, I'm interested about usability feedback:

https://framagit.org/razer/bubblemail/tree/local_maildir_accounts

Regards

Comment 14 Stefan Assmann 2020-02-02 10:14:11 UTC
My pleasure, I'm happy to test any changes.

I checked out
59d8652dbe8e Improve account add/edit
ran
./bin/bubblemaild
and
./bin/bubblemail

how did you envision the local maildir to be configured?
I still can't click the "Local mail" settings, same backtrace.
The new account popup does not show maildir as "Type".

My suggestion would be to have "Maildir" as a new "Type" and allow to choose a local folder to watch.

Comment 15 Stefan Assmann 2020-02-02 10:49:01 UTC
Sorry, I realized I have to do an install.

I've added a maildir account for a local maildir folder. Looks good so far.
However no plugins show up, I assume that might be because I installed to to /usr/local and not /usr.
Could you double check that?

Comment 16 Razer 2020-02-02 10:54:29 UTC
Yes, you're right about plugins path, and that's kind of an issue too.
As a turnaround, just copy the plugins folder in ~/.config/bubblemail

Comment 17 Stefan Assmann 2020-02-02 11:53:01 UTC
I got plugins working now and here's my feedback.

Few comments/suggestions:
- When clicking "Show log file" and returning back to the main window the
  following warning is displayed
(bubblemail:31983): Gtk-WARNING **: 12:11:13.342: Child name 'main' not found in GtkStack
  There's also the problem that the "<" button does not change back to a
  "+". So after checking the log file you can no longer add a new
  account.

- When adding a new maildir account and selecting a folder, the account name
  could be derived from the folder name if it is still empty at that
  point.

- I like to poll my mails more frequently, could you add intervals of 1 and 2
  minutes? Maybe at a later point you could add a feature to watch the folder
  with inotify. You wouldn't have to poll mails any longer and new mails
  would get recognized instantly.

- Regarding libnotify, afaict all new mails are displayed in a single
  notification, maybe that could be extended later on as well. Few
  things I think would be neat.
  - show each new mail individually with account name where it was received
  - configurable timeout delay for how long notifications are displayed
  The way I currently use notifications is a little different, I just
  want to point it out briefly. I'm counting new mails from all maildirs
  and have a notification that simply displays the number of new mails.
  I keep this notification permanently until all new mails are marked
  read. Kinda similar to what a try icon might do. Maybe a tray icon
  plugin would be an idea?

Comment 18 Razer 2020-02-02 12:05:07 UTC
Wow, what usability test you have done here, thanks a lot !
I will consider all your requests wisely.
Unfortunatly, right know I've plenty of work tracking regressions, adapting tests to the new code, handle the new translation strings...
Then I'll sync this branch to master.

Besides, I've just commited something related to your plugins problem

Comment 19 Stefan Assmann 2020-02-02 12:11:48 UTC
You're welcome!
The plugins now show up with /usr/local as install target but clicking on any plugins settings icon does nothing.

Comment 20 Razer 2020-02-02 19:19:37 UTC
> The plugins now show up with /usr/local as install target but clicking on any plugins settings icon does nothing.

#0f25f90d should fix it

> When clicking "Show log file" and returning back to the main window the following warning is displayed

#a4e7d428 should fix it

> When adding a new maildir account and selecting a folder, the account name could be derived

Done : #72304c7e

> I like to poll my mails more frequently, could you add intervals of 1 and 2 minutes?

Done : #a0b49df5

> Regarding libnotify, afaict all new mails are displayed in a single
> notification, maybe that could be extended later on as well. Few
> things I think would be neat.

It was, just removed it afraid of users complaining about a notifications torrent.
Did you use gnome ? The gnome-shell extension seems to me fitting your description :
https://extensions.gnome.org/extension/2458/bubblemail/

Comment 21 Stefan Assmann 2020-02-03 08:23:23 UTC
Nice, I see you made a lot of progress!

72304c7e623a Make new account name follow local mail path
Doesn't work for me, the account name is still blank after choosing a folder.
Another suggestion here. The "Maildir folder" dropdown menu most of them time won't contain the folder you want to choose and you have to select "Other" to get the real folder select popup window. Either have 2 entries (dropdown and popup) or maybe default to open the popup menu by default.
Local mailboxes are often located in ~/Mail. Would be a nice starting point for searching for mailboxes if the directory exists.

https://extensions.gnome.org/extension/2458/bubblemail/
Looks pretty much for what I was talking about, except I'm on XFCE. ;-)

I've also noticed that there's a scrollbar showing up on the right side of the main window. Should either decrease the size of the box holding the accounts or make the default window size a bit bigger.

Following warning shows up when running
$ sudo python3 setup.py install
/usr/lib64/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)

Comment 22 Razer 2020-02-03 10:06:32 UTC
> Doesn't work for me, the account name is still blank after choosing a folder.

Weird, it's working for me, and the code is pretty simple : just checks for an empty initial account name

> The "Maildir folder" dropdown menu most of them time won't contain the folder you want to choose

Yeah, noticed that too, but no way to change it in glade. Need to investigate how to do it in the code

> except I'm on XFCE

Need a specific backend. Libnotify plugin goal is to be generic.
-> todo list

And I suppose your distutils warning related to your prefix installation

Comment 23 Fedora Update System 2020-02-08 01:38:34 UTC
bubblemail-0.4-3.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2020-02-08 02:01:52 UTC
bubblemail-0.4-3.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.