Closed edikiuspro closed 3 years ago
Please show full code
@Antoni-Czaplicki from vulcan import Keystore,Account,Vulcan import asyncio import json with open("keystore.json") as f: keystore = Keystore.load(json.load(f)) account=Account.register(keystore,"token","symbol","pin") with open("account.json", "w") as f: f.write(account.as_json) json.dump(account.as_dict, f)
Okay i fixed it with account=asyncio.get_event_loop().run_until_complete(Account.register(keystore,"token","stmbol","pin"))
This is not the way you should use coroutines. Please, read the docs (introduction pages) to use the coroutines as appropriate.
https://vulcan-api.readthedocs.io/en/latest/getting-started/01-info.html
AttributeError: 'coroutine' object has no attribute 'as_json' sys:1: RuntimeWarning: coroutine 'Account.register' was never awaited