pazz / alot

Terminal-based Mail User Agent
GNU General Public License v3.0
696 stars 164 forks source link

Remove erroneous extra argument #1543

Closed lucc closed 3 years ago

lucc commented 3 years ago

Introduced in 05ab65cdcb0107d7cd541e59b3937aefdd0d8cda (part of #1528) but as far as I can see the definition of that function does not accept the extra keyword argument.

I also get this message in the logs

ERROR:ui:Traceback (most recent call last):
  File "/home/luc/src/alot/alot/ui.py", line 723, in apply_command
    cmd.apply(self)
  File "/home/luc/src/alot/alot/commands/thread.py", line 614, in apply
    tbuffer.focus_selected_message()
  File "/home/luc/src/alot/alot/buffers/thread.py", line 199, in focus_selected_message
    self.set_focus(self.get_selected_message_position())
  File "/home/luc/src/alot/alot/buffers/thread.py", line 183, in set_focus
    self.body.set_focus(pos, valign='top')
TypeError: set_focus() got an unexpected keyword argument 'valign'

with the corresponding error message in the interface.

pazz commented 3 years ago

@mrichar1 ?

lucc commented 3 years ago

PS: I am on master (32b885d07e8a32695fbb6ebd92a41a7052b148c3) on nixos with python 3.8.5 when I get the above error.

mrichar1 commented 3 years ago

self.body.set_focus(pos, valign='top') is actually a call to set_focus in urwidtrees:

https://github.com/pazz/urwidtrees/blob/f2e79bee3ccfcdfa774b9b69375115a9693cb6fe/urwidtrees/widgets.py#L123

This change was added in urwidtrees == 1.0.3 - have you updated to this (or master) as a dependency of alot?

lucc commented 3 years ago

No I am running with urwidtrees 1.0.2 from nixos. I have to check how to patch the derivation there to get a newer urwidtrees in my local development.

Sorry for the noise. I will put this on hold until I have resolved that.