Author

Topic: Possible bug in main_window.py line number 2620 (Read 357 times)

newbie
Activity: 56
Merit: 0
January 16, 2016, 04:31:08 PM
#2
you would be best posting this as an issue on github then the right people will see it Smiley
newbie
Activity: 4
Merit: 0
I just cloned the electrum sources from github, and tried to run it. After installing all the python packages needed, I was able to run it.

First window was the one where I chose to create a new wallet. After creating the wallet, I was shown the main window.

At that point, I tried clicking preferences icon on the bottom right. Nothing happened. Same when I tried to open preferences from the menu.

So the preferences window won't open, but it would print this error on console:

Traceback (most recent call last):
  File "C:\software\projects\clients\gits\electrum\gui\qt\main_window.py", line
2632, in settings_dialog
    update_feeperkb()
  File "C:\software\projects\clients\gits\electrum\gui\qt\main_window.py", line
2620, in update_feeperkb
    dynfee_sl.setEnabled(b)
TypeError: QWidget.setEnabled(bool): argument 1 has unexpected type 'NoneType'


So if you look at the source https://github.com/spesmilo/electrum/blob/master/gui/qt/main_window.py#L2620

The error is that the return value b of the call to self.config.get() is not checked. and in this case its returning a NoneType or no value at all.

In any case, I was able to open the preferences window by either uncommenting the line 2620, or by enclosing lines 2620-23 in a if b is true statement, so that they only use b if its not a NoneType.

This is my first hour with Electrum code, so I would ask more expert hands to see what the issue is, and whether there is an issue or bug here at all.


Jump to: