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

Correct scrypt_params missing in SigningKey call #40

Closed
wants to merge 1 commit into from

Conversation

zicmama
Copy link

@zicmama zicmama commented Feb 7, 2018

File "create_and_publish_identity.py", line 42, in get_identity_document
key = SigningKey(salt, password)
TypeError: init() missing 1 required positional argument: 'scrypt_params'

  File "create_and_publish_identity.py", line 42, in get_identity_document
    key = SigningKey(salt, password)
TypeError: __init__() missing 1 required positional argument: 'scrypt_params'
@coveralls
Copy link

coveralls commented Feb 7, 2018

Coverage Status

Coverage remained the same at 86.025% when pulling cc7f09a on zicmama:patch-1 into 1289d74 on duniter:master.

@vtexier
Copy link
Contributor

vtexier commented Feb 7, 2018

First, I don't have the problem. So can you tell us the version of python you are using and how you installed the api, on which platform ?

We must keep the examples as simple as possible.

I think that if a the fix is needed, it should be done in duniter-python-api/duniterpy/key/signing_key.py :

This code :

class SigningKey(libnacl.sign.Signer):
    def __init__(self, salt, password, scrypt_params=ScryptParams(4096,16,1)):

should be :

class SigningKey(libnacl.sign.Signer):
    def __init__(self, salt, password, scrypt_params=None):
        if scrypt_params=None:
            scrypt_params=ScryptParams(4096,16,1)

@M5oul
Copy link
Member

M5oul commented Feb 7, 2018

Thanks for your contribution.
I also don't get this error.

@vtexier vtexier closed this Feb 8, 2018
@vtexier vtexier reopened this Feb 8, 2018
@vtexier vtexier closed this Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants