keepkey/python-keepkey

Error loading keepkey plugin: TypeError("__new__() got an unexpected keyword argument 'file'"

Closed this issue · 4 comments

When I try to load a wallet in electrum that references to a keepkey, I get the following error:
File "/usr/local/lib/python3.6/dist-packages/electrum/base_wizard.py", line 148, in upgrade_storage self.waiting_dialog(do_upgrade, _('Upgrading wallet format...'), on_finished=on_finished) File "/usr/local/lib/python3.6/dist-packages/electrum/gui/qt/installwizard.py", line 497, in waiting_dialog on_finished() File "/usr/local/lib/python3.6/dist-packages/electrum/base_wizard.py", line 138, in on_finished self.wallet = Wallet(self.storage) File "/usr/local/lib/python3.6/dist-packages/electrum/wallet.py", line 1834, in __new__ wallet = WalletClass(storage) File "/usr/local/lib/python3.6/dist-packages/electrum/wallet.py", line 1665, in __init__ Deterministic_Wallet.__init__(self, storage) File "/usr/local/lib/python3.6/dist-packages/electrum/wallet.py", line 1507, in __init__ Abstract_Wallet.__init__(self, storage) File "/usr/local/lib/python3.6/dist-packages/electrum/wallet.py", line 192, in __init__ AddressSynchronizer.__init__(self, storage) File "/usr/local/lib/python3.6/dist-packages/electrum/address_synchronizer.py", line 89, in __init__ self.load_and_cleanup() File "/usr/local/lib/python3.6/dist-packages/electrum/wallet.py", line 215, in load_and_cleanup self.load_keystore() File "/usr/local/lib/python3.6/dist-packages/electrum/wallet.py", line 1673, in load_keystore self.keystore = load_keystore(self.storage, 'keystore') File "/usr/local/lib/python3.6/dist-packages/electrum/keystore.py", line 732, in load_keystore k = ks_constructor(d) File "/usr/local/lib/python3.6/dist-packages/electrum/keystore.py", line 715, in hardware_keystore return constructor(d) File "/usr/local/lib/python3.6/dist-packages/electrum/plugin.py", line 191, in dynamic_constructor return self.get_plugin(name).keystore_class(d) File "/usr/local/lib/python3.6/dist-packages/electrum/plugin.py", line 199, in get_plugin self.load_plugin(name) File "/usr/local/lib/python3.6/dist-packages/electrum/plugin.py", line 116, in load_plugin raise Exception(f"Error loading {name} plugin: {repr(e)}") from e Exception: Error loading keepkey plugin: TypeError("__new__() got an unexpected keyword argument 'file'",)

That is on ubuntu 18.04 with electrum 3.3.4 and hardware wallet python libraries freshly upgraded from pip3.
The same configuration seems to work in a docker container. So I don't really know what is causing problems here.

The stack trace is all Electrum, and no python-keepkey.... have you asked upstream? @SomberNight

No I didn't ask upstream first, because it only happens with Keepkey. Trezor and Ledger work fine. And the error is: Error loading keepkey plugin.
So, do you think the problem is more with the keepkey plugin that is shipped with Electrum?

Yes, that's my suspicion.

That it's trying to load a keystore while starting the keepkey plugin smells weird to me.