This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: circular impoty
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.11, Python 3.10, Python 3.9, Python 3.8, Python 3.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: KOMILJONOV, iritkatriel
Priority: normal Keywords:

Created on 2022-01-24 06:47 by KOMILJONOV, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg411447 - (view) Author: shukurulloxkomiljonov (KOMILJONOV) Date: 2022-01-24 06:47
ImportError: cannot import name 'Db' from partially initialized module 'orm_model.db' (most likely due to a circular import) (C:\Users\Komil\OneDrive\Desktop\mymodel\orm_model\db.py)


I am making al library!

I have model.py and db.py
in db.py has class Db
in model.py has class Model

db.py imported Model
and model.py imported Db

but i have error 

ImportError: cannot import name 'Db' from partially initialized module 'orm_model.db' (most likely due to a circular import) 


how can i resolve it please enswer me!
msg411454 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-01-24 08:39
The python bug tracker is for reporting bugs in python, not for asking questions about how to use it.

You cans ask user questions on python-list (though in this case I would try by searching for ‘python circular import’).
History
Date User Action Args
2022-04-11 14:59:55adminsetgithub: 90657
2022-01-24 08:54:41eric.smithsettype: crash -> behavior
2022-01-24 08:39:22iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg411454

resolution: not a bug
stage: resolved
2022-01-24 06:47:04KOMILJONOVcreate