lostb053/anibot

DeprecationWarning

Opened this issue · 10 comments

Found this error on Heroku

/app/anibot/__main__.py:21: DeprecationWarning: There is no current event loop asyncio.get_event_loop().run_until_complete(main())

@zYxDevs No idea how to fix
But bot works regardless

@lostb053 yeah bot is working fine, i just found that error so i think should report it here

@zYxDevs heh
i know it already
no idea what's it about tho

@lostb053 ok then, now let me say my request, make it possible bot to send airing, subsplease, cruncyroll, news notifier in a channels too

loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(main())

Should fix that. It happens cause asyncio couldn't get active event loop on main thread for some reason.

Thanx
Lemme try

loop = asyncio.new_event_loop()
loop.run_until_complete(main())

Should fix that. It happens cause asyncio couldn't get active event loop on main thread for some reason.

Not that i understand reasoning why it doesn't work

@lostb053 there is have another error too open change gui settings (bullets) then press back and see logs, there is say cant edit message with same query i guess🤔

@zYxDevs Will see

Not that i understand reasoning why it > doesn't work

Ig you might be using python3.10, in py10 default event loop is being removed from main thread, right now it works fine and just shows warning but in future it might raise RuntimeError which will cause your bot stop functioning.