I have gotten a error on one of my python scripts and I have no idea what it is and google has been no help. what is this error and how could I fix it?
code snippet:
import discord import os import asyncio from discord.ext import commands from discord.ext.commands import Bot from discord.utils import get import requests, random, replit import json intents = discord.Intents(members=True, messages = True, guilds=True,) BOT_PREFIX = ("!") client = commands.Bot(command_prefix=BOT_PREFIX, intents = intents) bot = commands.Bot(command_prefix=BOT_PREFIX, intents = intents)
error:
Traceback (most recent call last): File "C:/Users/Parents/Desktop/Documents/python/json.py", line 3, in <module> import discord File "C:\Users\Parents\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\__init__.py", line 25, in <module> from .client import Client File "C:\Users\Parents\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 33, in <module> import aiohttp File "C:\Users\Parents\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\__init__.py", line 6, in <module> from .client import ( File "C:\Users\Parents\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\client.py", line 6, in <module> import json File "C:/Users/Parents/Desktop/Documents/python\json.py", line 10, in <module> from discord.ext import commands File "C:\Users\Parents\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\__init__.py", line 13, in <module> from .bot import Bot, AutoShardedBot, when_mentioned, when_mentioned_or File "C:\Users\Parents\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\bot.py", line 37, in <module> from .core import GroupMixin File "C:\Users\Parents\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 36, in <module> from .cooldowns import Cooldown, BucketType, CooldownMapping, MaxConcurrency File "C:\Users\Parents\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\cooldowns.py", line 32, in <module> from ...abc import PrivateChannel File "C:\Users\Parents\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\abc.py", line 40, in <module> from .voice_client import VoiceClient, VoiceProtocol File "C:\Users\Parents\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\voice_client.py", line 50, in <module> from .gateway import * File "C:\Users\Parents\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\gateway.py", line 214, in <module> class DiscordClientWebSocketResponse(aiohttp.ClientWebSocketResponse): AttributeError: partially initialized module 'aiohttp' has no attribute 'ClientWebSocketResponse' (most likely due to a circular import)
https://stackoverflow.com/questions/66811260/python-import-error-partially-initialized-module-aiohttp-has-no-attribute March 26, 2021 at 12:56PM
没有评论:
发表评论