create_task = asyncio.async: SyntaxError: invalid syntax

Where does the error come from?

The version of discord.py you are using does not support Python 3.7 (in which async becomes a reserved keyword), as explained in this issue.
This version of discord.py, which is the default branch on the GitHub repo, is sadly the one installed by Pip.

How to fix it

You can either:

  • downgrade your version of Python to 3.6.
  • install another version of discord.py, based on the rewrite branch which is under active development, for example with the command : python3 -m pip install --user -U https://github.com/Rapptz/discord.py/archive/rewrite.zip

Leave a Comment