I’m using VS Code on my laptop, and ever since I created a circular import error message in my terminal, I have not been able to get rid of it. I tried everything from making obvious changes to the code, to clearing the cache, to a complete uninstall of any reference to VS Code, and the issue still persist,. I have since fixed the issue with the circular import using my desktop, and if I run the new code on my laptop, I get the same error message as before, even though I know the circular import isn’t with my current code. Any idea what it can be or how I can fix this issue so I can continue to use my laptop to code?
This is the feedback I get within my terminal, no matter what code I enter.
Traceback (most recent call last):
File "c:UserskdoggOneDriveDesktopAnime-UltimateAnimeUltimateBotmain.py", line 2, in <module>
from discord.ext import commands
File "C:UserskdoggAppDataLocalProgramsPythonPython311Libsite-packagesdiscordextcommands__init__.py", line 11, in <module>
from .bot import *
File "C:UserskdoggAppDataLocalProgramsPythonPython311Libsite-packagesdiscordextcommandsbot.py", line 38, in <module>
from .core import GroupMixin
File "C:UserskdoggAppDataLocalProgramsPythonPython311Libsite-packagesdiscordextcommandscore.py", line 9, in <module>
class PlayerProfiles(commands.Bot):
^^^^^^^^^^^^
AttributeError: partially initialized module 'discord.ext.commands' has no attribute 'Bot' (most likely due to a circular import)
PS C:UserskdoggOneDriveDesktopAnime-Ultimate>
I tried completely deleting the file where the circular import was happening, and my output was the same error message. Tried uninstalling vs code, and deleting app data and all. I reinstalled it, ran the new code that works, and still got the same error.
Spiff is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1