Getting this error after updating Python to 3.7.0
Traceback (most recent call last):
File "main.py", line 1, in <module>
import discord
File "/Users/alex/code/leader-bot/venv/lib/python3.7/site-packages/discord/__init__.py", line 20, in <module>
from .client import Client, AppInfo, ChannelPermissions
File "/Users/alex/code/leader-bot/venv/lib/python3.7/site-packages/discord/client.py", line 38, in <module>
from .state import ConnectionState
File "/Users/alex/code/leader-bot/venv/lib/python3.7/site-packages/discord/state.py", line 36, in <module>
from . import utils, compat
File "/Users/alex/code/leader-bot/venv/lib/python3.7/site-packages/discord/compat.py", line 32
create_task = asyncio.async
^
SyntaxError: invalid syntax
Discord.py async does not work at all on 3.7, please downgrade to 3.6.X
Rewrite somewhat works but you should just stick to 3.6
Duplicate of #1249 and #1393.
Thank you.
from version 3.4
asycn and await are reserved keywords
like the error in below image
copy the link up to directory/folder name( not include __init__.py)
you will get a list of .py files

rename async file to _async or asynch or anything u want as async is now a reserved keyword with us from version 3.4
once renamed than open check in all files where we have import async
modify the new name every where
and enjoy
@ErMSDandyan async and await are only reserved in 3.7 onwards. Renaming library files or folders is not a good idea as it both creates inconsistency in your install and may confuse pip or setuptools if you decide to upgrade those libraries.
It also doesn't help for this issue, where asyncio.async is used. Modifying asyncio in this way will damage your install and prevent discord.py, or really any async library, from operating correctly.
Use an older version or use the rewrite branch to fix these issues.
I just followed the resolution i found on github
They have provided this resolution
So it worked for me so updated
Sent from my iPhone
On 21-Aug-2018, at 04:10, Devon R notifications@github.com wrote:
@ErMSDandyan async and await are only reserved in 3.7 onwards. Renaming library files or folders is not a good idea as it both creates inconsistency in your install and may confuse pip or setuptools if you decide to upgrade those libraries.
It also doesn't help for this issue, where asyncio.async is used. Modifying asyncio in this way will damage your install and prevent discord.py, or really any async library, from operating correctly.
Use an older version or use the rewrite branch to fix these issues.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Most helpful comment
Discord.py async does not work at all on 3.7, please downgrade to 3.6.X
Rewrite somewhat works but you should just stick to 3.6