#asyncio Unclosed client sessionclient_session aiohttp.client.ClientSession object at 0x7f95b03d4

16 messages · Page 1 of 1 (latest)

mellow plover
#

trying to pinpoint where this error comes from, so I can fix it
im also pretty sure this only shows up inside my logging file, havent seen it in terminal at all

#

honestly i just feel like it sends at random times 2_shrug

mystic pewter
#

The script closed/function stopped without closing aiohttp.client.ClientSession at address 0x7f95b03d4

#

So, you had an open session

mellow plover
#

yeah but the script shouldnt of shut, and all functions are using a bot var so it dosent make sense to me

mystic pewter
#

How are you handling the sessions?

mellow plover
#

inside my functions?

#
async with self.bot.session.get('URL') as r:
    res = await r.json()

test = res['test']
await ctx.send(test)``` this is just a way shorter example of what i do
#

i also check r.status

#

tbh this may be an error with a lib i am using to post topgg stats i will have to check quickly

#

2 mins

mystic pewter
#

What does your __init__ look like?

mellow plover
#

consider my bot started at 6:11 and i got the error at 7:11, and the topgg timer is on a 1h timer i think it is that

#

considering*

#

i assume its made its own session that is handled incorrectly, didnt realise i could pass my session into the class

#

im going to do that and see how it holds up, I will let you know if it keeps happening