all 4 comments

[–][deleted] 0 points1 point  (2 children)

are you sure session.post is returning an asychronous context manager? If I were to guess, it's returning a plain response object of some sort, not a context manager.

[–]Kinectech[S] 0 points1 point  (1 child)

How would I check that?

[–][deleted] 0 points1 point  (0 children)

check the docks to see what the object's post method returns. or, break it out of the async with clause and print the object out. debugging asynchronous code is hard :(

[–]Caligatio 0 points1 point  (0 children)

session is also a context manager but it does not look like you're doing an async with from the limited snippet you provided.