Skip to content
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

Trezor T support #6

Closed
curiosity81 opened this issue Jun 17, 2018 · 5 comments
Closed

Trezor T support #6

curiosity81 opened this issue Jun 17, 2018 · 5 comments

Comments

@curiosity81
Copy link

curiosity81 commented Jun 17, 2018

Hi,

I got electrum-nmc working on an ubuntu 16.04 system. Then I tried the hardware support of electrum-nmc. I am not very experienced with the Trezor T hardware yet, but the device works well via the web interface of the manufacturer. With electrum-nmc I get the following error message:

Traceback (most recent call last):
  File "/home/<user>/.local/lib/python3.5/site-packages/electrum_nmc/plugins.py", line 151, in get_hardware_support
    p = self.get_plugin(name)
  File "/home/<user>/.local/lib/python3.5/site-packages/electrum_nmc/plugins.py", line 179, in get_plugin
    self.load_plugin(name)
  File "/home/<user>/.local/lib/python3.5/site-packages/electrum_nmc/plugins.py", line 104, in load_plugin
    plugin = p.Plugin(self, self.config, name)
  File "/home/<user>/.local/lib/python3.5/site-packages/electrum_nmc_plugins/trezor/trezor.py", line 120, in __init__
    import trezorlib.ckd_public
  File "/home/<user>/.local/lib/python3.5/site-packages/trezorlib/ckd_public.py", line 5, in <module>
    from .tests.support.ckd_public import *  # noqa
ImportError: No module named 'trezorlib.tests.support'

Where can I find this module (trezorlib.tests.support) or do I have to install some additional package? I also installed

https://github.com/trezor/python-trezor

But this did not help.

Any suggestions?

BTW: I do not understand the following message at the beginning of the issues text box:

Do not post issues about non-bitcoin versions of Electrum.

This makes no sense since this is the namecoin fork of electrum. Right?

@curiosity81
Copy link
Author

Same error with electrum-ltc :-(

@curiosity81
Copy link
Author

curiosity81 commented Jun 17, 2018

Ok. I figured the error out.

Zeroly, python is a pain in the ass. I only wanted to say that :-P

Firstly, the Trezor T is not working at all, not for electrum, electrum-ltc and electrum-nmc.

Secondly, if one follows the README.md at

https://github.com/trezor/python-trezor

for the Trezor T with

pip3 install --upgrade setuptools
pip3 install trezor

then the directory

/home/<user>/.local/lib/python3.5/site-packages/trezorlib/tests/support

is missing. However, this directory exists in the current github snapshot.

What I did was to install python-trezor as recommended in the corresponding README.md file. Thus, the directory structure in .local/lib/python3.5/site-packages/trezorlib is created. Then I cloned the current python-trezor project. Therein exists an folder trezorlib. I renamed the already existing trezorlib directory in .local/lib/python3.5/site-packages to trezorlib.old and copied the trezorlib directory from the git clone to this location. I also copied the file trezorlib.old/coins.json to the new trezorlib. This is necessary, otherwise the electrums will complain. Then follow the normal electrum procedure for creating a wallet with hardware wallet support. Make sure that you have connected the Trezor T to your computer and that the device is unlocked. The device should be detected by the system no matter which electrum is used.

I have not tested yet if the rest of electrum is working properly.

@matejcik
Copy link

FWIW this is fixed in electrum commit spesmilo@208606b

you can cherry-pick that commit into your repository; it's isolated to the Trezor plugin

i'll also do a point release to fix the packaging issue

@JeremyRand
Copy link
Member

BTW: I do not understand the following message at the beginning of the issues text box:

Do not post issues about non-bitcoin versions of Electrum.

This makes no sense since this is the namecoin fork of electrum. Right?

@curiosity81 You've run into #4 .

FWIW this is fixed in electrum commit spesmilo/electrum@208606b

you can cherry-pick that commit into your repository; it's isolated to the Trezor plugin

i'll also do a point release to fix the packaging issue

@matejcik Thanks for the upstream fix, I'll merge that along with the next merge from upstream.

@JeremyRand
Copy link
Member

The relevant upstream fix is now merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants