无法导入名称“ hdrs”

时间:2020-11-11 04:40:43

标签: python discord

我正在编码一个不和谐的机器人。该代码昨天确实可以正常工作,我什么都没做,但是现在我遇到了导入错误。我在Pycharm和最新版本的Discord上使用Python 3.6.3。

这是回溯:

Traceback (most recent call last):
  File "C:/Users/yishi/PycharmProjects/DiscordBot/bot.py", line 2, in <module>
    import discord
  File "C:\Users\yishi\PycharmProjects\DiscordBot\venv\lib\site-packages\discord\__init__.py", line 25, in <module>
    from .client import Client
  File "C:\Users\yishi\PycharmProjects\DiscordBot\venv\lib\site-packages\discord\client.py", line 33, in <module>
    import aiohttp
  File "C:\Users\yishi\PycharmProjects\DiscordBot\venv\lib\site-packages\aiohttp\__init__.py", line 5, in <module>
    from . import hdrs as hdrs
ImportError: cannot import name 'hdrs'

1 个答案:

答案 0 :(得分:0)

尝试更新到3.8或3.9等最新版本的Python