discord.py有哪些问题?

时间:2018-12-06 10:42:44

标签: python discord.py

我已经导入了discord和asyncio,仅此而已

    import discord
    import asyncio

我得到了这个输出:

**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**

因此,我认为discord.py的模块代码中存在问题,但是我该如何解决呢?我还刚刚从命令终端卸载并重新安装了discord.py。

1 个答案:

答案 0 :(得分:1)

据我所知,discord.py async无法在python 3.7中正常运行,您可能更喜欢使用python 3.6.5之类的旧版本