@akst/

Async Stack Trace Example

Python

No description

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.6643179649229405","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IGFzeW5jaW8KCmFzeW5jIGRlZiBmb28oKToKICByZXR1cm4gJ2ZvbycKCmFzeW5jIGRlZiBiYXIoKToKICByZXR1cm4gJ2JhcicKICAKYXN5bmMgZGVmIHdpdGhfYXJncygqYXJncyk6CiAgcmFpc2UgRXhjZXB0aW9uKHN0cihhcmdzKSkKCmFzeW5jIGRlZiBtYWluKCk6CiAgYSA9IGF3YWl0IGZvbygpCiAgYiA9IGF3YWl0IGJhcigpCiAgYXdhaXQgd2l0aF9hcmdzKGEsIGIpCgpsb29wID0gYXN5bmNpby5nZXRfZXZlbnRfbG9vcCgpCmxvb3AucnVuX3VudGlsX2NvbXBsZXRlKG1haW4oKSkKbG9vcC5jbG9zZSgpCg=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import asyncio

async def foo():
  return 'foo'

async def bar():
  return 'bar'
  
async def with_args(*args):
  raise Exception(str(args))

async def main():
  a = await foo()
  b = await bar()
  await with_args(a, b)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()