-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
SyntaxError: 'async with' outside async function #23
Comments
try this import asyncio
from bscscan import BscScan
async def main():
async with BscScan('MY_API') as bsc:
print(await bsc.get_bnb_balance(address="0x0000000000000000000000000000000000001004"))
if __name__=="__main__":
asyncio.run(main()) I suggest either reading up a bit on Thank you for this question though, I will improve the documentation by adding this example. |
hello, im fully new into this, can you explain to me how to run the code at all :) ? like, can i download any chrome extension to run the code and then enter my preferences in a UI ? |
@pt40039 I'm afraid you have to look into basic |
How do I fix this?
My code:
results in:
SyntaxError: 'async with' outside async function
The text was updated successfully, but these errors were encountered: