Skip to content
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

DeprecationWarning #19

Open
zYxDevs opened this issue Mar 1, 2022 · 10 comments
Open

DeprecationWarning #19

zYxDevs opened this issue Mar 1, 2022 · 10 comments

Comments

@zYxDevs
Copy link

zYxDevs commented Mar 1, 2022

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())

@lostb053
Copy link
Owner

lostb053 commented Mar 1, 2022

@zYxDevs No idea how to fix
But bot works regardless

@zYxDevs
Copy link
Author

zYxDevs commented Mar 1, 2022

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

@lostb053
Copy link
Owner

lostb053 commented Mar 1, 2022

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

@zYxDevs
Copy link
Author

zYxDevs commented Mar 1, 2022

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

@starry-shivam
Copy link

starry-shivam commented Mar 3, 2022

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.

@lostb053
Copy link
Owner

lostb053 commented Mar 6, 2022

Thanx
Lemme try

@lostb053
Copy link
Owner

lostb053 commented Mar 6, 2022

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

@zYxDevs
Copy link
Author

zYxDevs commented Mar 6, 2022

@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🤔

@lostb053
Copy link
Owner

lostb053 commented Mar 6, 2022

@zYxDevs Will see

@starry-shivam
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants