-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2.6 - Trezor file won't load on startup #1637
Comments
Can you try again or provide the backtrace that appeared before that one? When a plugin fails to load there are typically 2, and the 1st is the interesting one. I just tried opening a trezor wallet and it was fine (with commit 144f53b on HEAD). |
Sorry about that. Here it is, after performing the latest pull this morning: Traceback (most recent call last): |
I have never seen this module "PIL" being mentioned before... I went and installed py-pil, but it didn't change anything. |
Try installing from http://pythonware.com/products/pil/
|
Here is the commit that added the PIL import: a3bced2
|
Ok - installed PIL directly from pythonware. Got rid of the errors above, but now it can't see the Trezor when I try to load the wallet. I have checked the communication independently with the python-trezor commands and it works - but not with Electrum. I get this instead: Traceback (most recent call last): |
I thought PIL was already a dependency. I'll look into avoiding that. The disconnected exception happens after it asks for your PIN. Can you confirm you are being asked for your PIN and that you're not cancelling the request? Sometimes the device gets in a funny state that is solved by reinserting it. The watching only warning is misleading as after you enter your PIN it goes out of watching only mode - check the window title bar. |
Electrum just doesn't see it. I tried to start Electrum, then connect the Trezor. I tried by connecting to USB port first, then starting Electrum. Nothing. I tried by starting with default_wallet (normal type wallet) and then switching to Trezor wallet - watch-only again. I can't create a new Trezor wallet either. I doesn't ask me for my PIN. |
Found something... If I revert to an older version of the python-trezor library (0.6.6 for example) - Trezor now works with Electrum v2.6 The python-library is now at 0.6.11. 0.6.6 uses protobuf 2.5.0 and 0.6.11 uses protobuf 2.6.1. Electrum uses protobuf 3.0.0 - don't know if this makes any difference. |
Thanks for the info. FYI I have trezor 0.6.7 installed, protobuf 2.6.1. Once I've resolved other issues I'll look into updating my trezor library version and trying to reproduce. So I understand the following: trezor 0.6.11 and protobuf 2.6.1 not working for ELM4Ever If you could test trezor 0.6.7 so we have a common good version that would be good. |
I don't have trezor 0.6.7 - they don't list older versions on their github repo. It just happened that I found a copy of 0.6.6 in my download folder. BTW, when you "sudo python setup.py install" Electrum, the setup.py will swap your protobuf to v.3.0.0 automatically.
|
OK that's very useful thanks. Seeing as command line Trezor has an issue this seems to be more an incompatibility of protobuf 3 and newer Trezor rather than specifically an Electrum issue. Can you inform them? |
I can. Protobuf 2.6.1 is the last stable version. It would be wise to also restrict Electrum to that version in the setup.py file. |
BTW: Electrum 2.5.4, Python-Trezor 0.6.11 and protobuf 2.6.1 work well together. |
Yes trezor 0.6.11 seems to have a problem. Let me update and avoid the issue in Electrum |
@ELM4Ever - please confirm if this solves the issue for you. I've updated to 0.6.11 locally and it is now fine. Unfortunately 0.6.10 is broken on the Mac, but I've made Electrum avoid the broken function so it works for me now on Mac. |
Excellent! Electrum 2.6 now works with phyton-trezor 0.6.11. So many new functions available for Trezor! Thanks. |
…puts (spesmilo#1637) In the case of nonminimal push forms in the scriptSig, we were parsing those inputs then reconstructing them with the minimal push opcode, which would result in weird things like the wrong TXID being shown in the tx details dialog.
…tSig (spesmilo#1648) fixes spesmilo#1628 continues the theme of spesmilo#1637 -- if an input has scriptSig, it *is* essentially complete. If people are doing smart contracts and need to save unsigned transactions, my recommendation for the initial wallet: - txin['type'] = 'unknown' - set txin['scriptSig'] to anything you want, but I recommend making sure the first couple of bytes are 0000 or ffff, something like that, which ensures it won't get misinterpreted as one of the special input types. You can even embed metadata or signatures here, go wild. Upon loading the transaction, Electron Cash will think that input is of an unknown type (good) but also thinks it is complete (wrong). As a result, the user will be presented with the ability to broadcast the tx, which will of course fail. It's your job as smart contract author to do something about that. Perhaps we can add a hook at the end of `Transaction.deserialize()`?
OSX 10.11.2 (El Capitan) - Electrum latest git pull (v2.6).
Upon starting Electrum, if the default wallet is a Trezor type - Electrum crashes with:
v2.5.4 works ok.
Traceback (most recent call last):
File "/usr/local/bin/electrum", line 5, in
pkg_resources.run_script('Electrum==2.6', 'electrum')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 492, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1350, in run_script
execfile(script_filename, namespace, namespace)
File "/Library/Python/2.7/site-packages/Electrum-2.6-py2.7.egg/EGG-INFO/scripts/electrum", line 350, in
gui.main()
File "/Library/Python/2.7/site-packages/Electrum-2.6-py2.7.egg/electrum_gui/qt/init.py", line 185, in main
self.config.get('url')):
File "/Library/Python/2.7/site-packages/Electrum-2.6-py2.7.egg/electrum_gui/qt/init.py", line 157, in start_new_window
wallet = self.daemon.load_wallet(path, self.get_wizard)
File "/Library/Python/2.7/site-packages/Electrum-2.6-py2.7.egg/electrum/daemon.py", line 131, in load_wallet
wallet = Wallet(storage)
File "/Library/Python/2.7/site-packages/Electrum-2.6-py2.7.egg/electrum/wallet.py", line 1948, in new
wallet = WalletClass(storage)
File "/Library/Python/2.7/site-packages/Electrum-2.6-py2.7.egg/electrum/plugins.py", line 125, in dynamic_constructor
return self.wallet_plugin_loader(name).wallet_class(storage)
File "/Library/Python/2.7/site-packages/Electrum-2.6-py2.7.egg/electrum/plugins.py", line 135, in wallet_plugin_loader
return self.plugins[name]
KeyError: 'trezor'
The text was updated successfully, but these errors were encountered: