ImportError: cannot import name 'idkom' from partially initialized module 'idkom' (most likely due to a circular import)

Viewed 20

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 Answers

You have a circular import.

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

You can't do that.

Related