Issue
I'd like to ask everyone for some help. This is what I'm running on Replit. After updating pip, I suddenly encountered the following error message, which might be due to an incompatibility issue between the packages or Python:
Thank you all for your help
py version:3.8 asyncio version:3.4.3
Error Msg:
Traceback (most recent call last):
File "main.py", line 101, in <module>
asyncio.run(main())
File "/nix/store/p21fdyxqb3yqflpim7g8s1mymgpnqiv7-python3-3.8.12/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/nix/store/p21fdyxqb3yqflpim7g8s1mymgpnqiv7-python3-3.8.12/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "main.py", line 94, in main
async with bot:
AttributeError: __aexit__
* Running on all addresses (0.0.0.0)
WARNING: This is a development server. Do not use it in a production deployment.
The original code
async def main():
async with bot:
await load_extensions()
await bot.start(os.environ['Token'])
if __name__ == "__main__":
keep_alive.keep_alive()
asyncio.run(main())
I try to reinstall some package but not work
Solution
As was already mentioned, OP is using very modern language constructs with 2 year old version of discord, which is excatly what it's complaining about. Keep close attention to the error message and there'd be no issue.
Answered By - iantonuk
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.