1

I have imported discord and asyncio and just that

    import discord
    import asyncio

and I got this output:

**Traceback (most recent call last):
  File "C:/Users/Jacki/OneDrive/Documents/Others/Discord bots/Basics bot test2 with discord.py saved here.py", line 1, in <module>
    import discord
  File "C:\Users\Jacki\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\__init__.py", line 20, in <module>
    from .client import Client, AppInfo, ChannelPermissions
  File "C:\Users\Jacki\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\client.py", line 38, in <module>
    from .state import ConnectionState
  File "C:\Users\Jacki\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\state.py", line 36, in <module>
    from . import utils, compat
  File "C:\Users\Jacki\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\compat.py", line 32
    create_task = asyncio.async
                              ^
SyntaxError: invalid syntax**

So I am taking it that there is a problem within the module code for discord.py, but how would I go about fixing this? I have also just uninstalled and re-installed discord.py from the command terminal.

Jacques Amsel
  • 1,061
  • 2
  • 14
  • 30

1 Answers1

2

According to my knowledge, discord.py async doesn't properly function with python 3.7 , you might prefer using older versions like python 3.6.5

DankCoder
  • 369
  • 1
  • 4
  • 15