Skip to content
This repository has been archived by the owner on Jun 5, 2019. It is now read-only.

error in firmware_update from URL #304

Closed
strmci opened this issue Sep 3, 2018 · 3 comments
Closed

error in firmware_update from URL #304

strmci opened this issue Sep 3, 2018 · 3 comments
Assignees
Labels
Milestone

Comments

@strmci
Copy link
Contributor

strmci commented Sep 3, 2018

AttributeError: 'str' object has no attribute 'write'

@strmci
Copy link
Contributor Author

strmci commented Sep 3, 2018

Tried this command:

trezorctl firmware_update -u https://github.com/trezor/webwallet-data/blob/master/firmware/1/trezor-1.5.0.bin

Error:

Traceback (most recent call last):
  File "/home/tomas/.local/bin/trezorctl", line 1059, in <module>
    cli()  # pylint: disable=E1120
  File "/home/tomas/.local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/tomas/.local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/tomas/.local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/tomas/.local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/tomas/.local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/tomas/.local/lib/python3.6/site-packages/click/decorators.py", line 27, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/home/tomas/.local/bin/trezorctl", line 425, in firmware_update
    click.echo('Downloading from', url)
  File "/home/tomas/.local/lib/python3.6/site-packages/click/utils.py", line 259, in echo
    file.write(message)
AttributeError: 'str' object has no attribute 'write'

@matejcik matejcik self-assigned this Sep 3, 2018
@matejcik matejcik added the bug label Sep 3, 2018
@matejcik matejcik added this to the next milestone Sep 3, 2018
@strmci strmci changed the title error in "trezorctl firmware_update -u https://github.com/trezor/webwallet-data/blob/master/firmware/1/trezor-1.5.0.bin" command error in firmware_update from URL Sep 3, 2018
@prusnak
Copy link
Member

prusnak commented Sep 3, 2018

The following URL is not a firmware: https://github.com/trezor/webwallet-data/blob/master/firmware/1/trezor-1.5.0.bin

It's a Github page

If you want link to firmware, you need to click "Download" on that page. This links point to https://github.com/trezor/webwallet-data/raw/master/firmware/1/trezor-1.5.0.bin which is a correct URL.

Anyway, I think the error message should be much less cryptic than it is now.

@matejcik
Copy link
Contributor

matejcik commented Sep 3, 2018

@prusnak that's also not the cause of the problem, it's an incorrect call to click.echo

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

No branches or pull requests

3 participants