0

I have a problem that the program throws this error: ImportError: cannot import name 'idkom' from partially initialized module 'idkom' (most likely due to a circular import) (d: \ Python \ Crystalia \ idkom.py)

These are both codes

from idkom import idkom

class Setup:
     def __init __ (self):
         self.Idkom = idkom (self)
         while True:
             self.Idkom.print ()

And the second

from setup import setup

class idkom:
     def __init __ (self):
         self.Setup = setup (self)

     def print (self):
         print ("Hello")
  • 1
    Does this answer your question? [What can I do about "ImportError: Cannot import name X" or "AttributeError: ... (most likely due to a circular import)"?](https://stackoverflow.com/questions/9252543/what-can-i-do-about-importerror-cannot-import-name-x-or-attributeerror) – Axe319 Sep 20 '22 at 17:14
  • As an aside, it must be `__init__`, with no space after the `t`. – Karl Knechtel Mar 03 '23 at 23:54

1 Answers1

0

You have a circular import.

authentication/models imports corporate/models, which imports corporate/models/section, which imports authentication/models.

You can't do that.