BitShares Forum

Main => Technical Support => Topic started by: oddhome on March 30, 2018, 05:02:08 am

Title: python bitshare i have some error sell command
Post by: oddhome on March 30, 2018, 05:02:08 am
i can run on my desktop work successful and upload to server run fail please help


Traceback (most recent call last):
  File "/var/web/tools/bot_trade_cryptobridge.py", line 65, in <module>
    print(market.sell(bid, amount))
  File "/usr/local/lib/python3.5/dist-packages/bitshares/market.py", line 513, in sell
    tx = self.bitshares.finalizeOp(order, account["name"], "active")
  File "/usr/local/lib/python3.5/dist-packages/bitshares/bitshares.py", line 292, in finalizeOp
    self.txbuffer.sign()
  File "/usr/local/lib/python3.5/dist-packages/bitshares/transactionbuilder.py", line 347, in sign
    signedtx.sign(self.wifs, chain=self.bitshares.rpc.chain_params)
  File "/usr/local/lib/python3.5/dist-packages/bitsharesbase/signedtransactions.py", line 21, in sign
    return super(Signed_Transaction, self).sign(wifkeys, chain)
  File "/usr/local/lib/python3.5/dist-packages/graphenebase/signedtransactions.py", line 186, in sign
    signature = sign_message(self.message, wif)
  File "/usr/local/lib/python3.5/dist-packages/graphenebase/ecdsa.py", line 180, in sign_message
    private_key = ec.derive_private_key(int(repr(priv_key), 16), ec.SECP256K1(), default_backend())
AttributeError: module 'cryptography.hazmat.primitives.asymmetric.ec' has no attribute 'derive_private_key'
Title: Re: python bitshare i have some error sell command
Post by: xeroc on March 30, 2018, 06:06:02 am
Interesting.

This could be fixed by running

  pip3 install secp256k1

as root.

Also, can you please create an issue on github for this? Thanks
Title: Re: python bitshare i have some error sell command
Post by: oddhome on March 30, 2018, 07:11:29 am
Thank you very much. it work.