ham-radio-software / D-Rats

D-Rats program for D-Star Ham Radios
https://iz2lxi.jimdofree.com/
Other
43 stars 13 forks source link

New email - attachment - remove attachment #226

Closed maurizioandreotti closed 1 year ago

maurizioandreotti commented 1 year ago

situation: creating a new email added a txt file as attachment issue: clicking on remove attachment I get:

`07/10/2023 13:07:09:INFO:KeyedListWidget:get_selected: Nothing was selected 07/10/2023 13:07:17:INFO:Utils.run_or_error:broad-exception Traceback (most recent call last): File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-version/d_rats/utils.py", line 251, in runner function(*args, kwargs) File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-version/d_rats/formgui.py", line 1736, in button_remove self.del_attachment(name) File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-version/d_rats/formgui.py", line 1433, in del_attachment els[0].unlinkNode() ^^^^^^^^^^^^^^^^^ AttributeError: 'lxml.etree._Element' object has no attribute 'unlinkNode' 07/10/2023 13:07:17:INFO:Utils.log_exception:-- Exception: -- Traceback (most recent call last): File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-version/d_rats/utils.py", line 251, in runner function(*args, *kwargs) File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-version/d_rats/formgui.py", line 1736, in button_remove self.del_attachment(name) File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-version/d_rats/formgui.py", line 1433, in del_attachment els[0].unlinkNode() ^^^^^^^^^^^^^^^^^ AttributeError: 'lxml.etree._Element' object has no attribute 'unlinkNode' Traceback (most recent call last): File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-version/d_rats/utils.py", line 251, in runner function(args, kwargs) File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-version/d_rats/formgui.py", line 1736, in button_remove self.del_attachment(name) File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-version/d_rats/formgui.py", line 1433, in del_attachment els[0].unlinkNode() ^^^^^^^^^^^^^^^^^ AttributeError: 'lxml.etree._Element' object has no attribute 'unlinkNode' 07/10/2023 13:07:17:INFO:Utils.log_exception:----------------

`

wb8tyw commented 1 year ago

In testing this, I see that the attachment menu has three buttons. "Add" which appears to add the attachment, and "Remove" which is supposed to remove the attachment, and is current broken, and "Save", which does not seem to do anything but log "Nothing was selected."

Now after trying to delete the attachment, the save button appears to want to save a copy of the attachment. But originally it would not select the newly created attachment.