0

All my code is on github except for the token.py file for obvious reasons. bot.py file I have had similar issues in the past and have resolved them by reconstructing some code so I apologize in advance if this is another one of those issues where I missed a capital or something but I have tried all the obvious syntax issues and none of them seemed to work. Atom also didn't show any errors.

Here is the whole error message:

Traceback (most recent call last):


File "C:\Users\james\Documents\botpy\bot.py", line 5, in <module>
    import discord
  File "C:\Users\james\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\__init__.py", line 21, in <module>
    import logging
  File "C:\Users\james\AppData\Local\Programs\Python\Python38-32\lib\logging\__init__.py", line 26, in <module>
    import sys, os, time, io, re, traceback, warnings, weakref, collections.abc
  File "C:\Users\james\AppData\Local\Programs\Python\Python38-32\lib\traceback.py", line 5, in <module>
    import linecache
  File "C:\Users\james\AppData\Local\Programs\Python\Python38-32\lib\linecache.py", line 11, in <module>
    import tokenize
  File "C:\Users\james\AppData\Local\Programs\Python\Python38-32\lib\tokenize.py", line 34, in <module>
    from token import *
  File "C:\Users\james\Documents\botpy\token.py", line 2, in <module>
    from discord.ext import commands
  File "C:\Users\james\AppData\Local\Programs\Python\Python38-32\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\james\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\bot.py", line 27, in <module>
    import asyncio
  File "C:\Users\james\AppData\Local\Programs\Python\Python38-32\lib\asyncio\__init__.py", line 8, in <module>
    from .base_events import *
  File "C:\Users\james\AppData\Local\Programs\Python\Python38-32\lib\asyncio\base_events.py", line 18, in <module>
    import concurrent.futures
  File "C:\Users\james\AppData\Local\Programs\Python\Python38-32\lib\concurrent\futures\__init__.py", line 8, in <module>
    from concurrent.futures._base import (FIRST_COMPLETED,
  File "C:\Users\james\AppData\Local\Programs\Python\Python38-32\lib\concurrent\futures\_base.py", line 42, in <module>
    LOGGER = logging.getLogger("concurrent.futures")
AttributeError: partially initialized module 'logging' has no attribute 'getLogger' (most likely due to a circular import)
Juliette
  • 23
  • 4
  • If you want to understand more about circular imports https://stackoverflow.com/questions/22187279/python-circular-importing – JenilDave May 10 '20 at 05:50
  • I renamed some files to try and fix the circular import issue, then when I re-ran the file bot.py it still said it had the same issue but it did recognize that I had renamed the files so I'm not really sure what's wrong now. – Juliette May 10 '20 at 06:35
  • i tried code on Python 3.7 (64-bit, Linux) and I don't get this error. – furas May 12 '20 at 02:31

1 Answers1

0

Try to rename your file into main.py

I had a similar error just because the filename.

Mircea
  • 1
  • 1