Skip to content
This repository was archived by the owner on Aug 8, 2018. It is now read-only.

Use str() instead of to_string(), as to_string() sometimes returns bytes#284

Open
robin-norwood wants to merge 1 commit intoethereum:developfrom
robin-norwood:fix-account-list-id-issue
Open

Use str() instead of to_string(), as to_string() sometimes returns bytes#284
robin-norwood wants to merge 1 commit intoethereum:developfrom
robin-norwood:fix-account-list-id-issue

Conversation

@robin-norwood
Copy link

pyethapp account list was giving the following error:

/pyethapp/app.py", line 586, in list_accounts
    click.echo(fmt.format(i='#' + to_string(i + 1),
TypeError: must be str, not bytes

This is because, on python 3, ethereum.utils.to_string() will, when given an integer, return bytes (!).

ethereum.utils.to_string should probably also be fixed, or at least given a more correct name, but that's more work than I'm willing to take on right now.

@robin-norwood
Copy link
Author

FYI, I don't think the Travis failure is due to this change - it looks like setuptools has deprecated the use of sets in requires. I'll submit a separate pull request for that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant