Closed mecrayavcin closed 1 year ago
The error message you're encountering, ImportError: cannot import name 'Client' from partially initialized module 'dnsimple'
, is indicative of a circular import issue. In Python, a circular import occurs when two or more modules depend on each other, directly or indirectly.
Here's a breakdown of what's going wrong in your code, based on the provided traceback:
dnsimple.py
located at c:\Users\SEO\Desktop\Python\Projects\Domain Backorder\Backorder\dnsimple.py.Client
from a module named dnsimple
with the line from dnsimple import Client
.Client
from dnsimple.py
, which is the same file the import statement is in. Hence, it's a circular import: dnsimple.py
is trying to import something from itself.Suggested action:
Change the dnsimple.py
to something else to avoid namespace conflicts.
Thanks very much
RESULT:
nv) C:\Users\SEO\Desktop\Python>C:/Users/SEO/anaconda3/envs/mainEnv/python.exe "c:/Users/SEO/Desktop/Python/Projects/Domain Backorder/Backorder/dnsimple.py" Traceback (most recent call last): File "c:\Users\SEO\Desktop\Python\Projects\Domain Backorder\Backorder\dnsimple.py", line 1, in
from dnsimple import Client
File "c:\Users\SEO\Desktop\Python\Projects\Domain Backorder\Backorder\dnsimple.py", line 1, in
from dnsimple import Client
ImportError: cannot import name 'Client' from partially initialized module 'dnsimple' (most likely due to a circular import) (c:\Users\SEO\Desktop\Python\Projects\Domain Backorder\Backorder\dnsimple.py)
At the first time when i tried it worked but after that try, i always get this error? How can i fix this? Thanks