PyWAVES:simplejson.errors.JSONDecodeError:期望值:第1行第1列(字符0)

时间:2020-10-26 18:36:31

标签: python-3.x wavesplatform

import pywaves as pw

def main():
    node = "https://nodes.wavesnodes.com"
    chain = "mainnet"

    pw.setNode(node=node, chain=chain)

    private_key = #############
    my_address_statement = pw.Address(privateKey=private_key)
    WAVES_balance = my_address_statement.balance()

    print("Your WAVES balance is: %d." % WAVES_balance)
    main()

main()

最终,此代码产生标题中指示的错误。如何避免这种情况?

1 个答案:

答案 0 :(得分:0)

事实证明,这段代码是多余的:

node = "https://nodes.wavesnodes.com"
chain = "mainnet"

pw.setNode(node=node, chain=chain)

没有它的重构解决了这个问题。

相关问题