Agora-Lab-AI / Dalle3

An API for DALLE-3
https://discord.gg/qUtxnK2NMf
MIT License
187 stars 14 forks source link

ImportError: cannot import name 'Dalle' from partially initialized module 'dalle3' #6

Closed syntaxsurge closed 1 year ago

syntaxsurge commented 1 year ago

Describe the bug from dalle3 import Dalle ImportError: cannot import name 'Dalle' from partially initialized module 'dalle3' (most likely due to a circular import)

kyegomez commented 1 year ago

@syntaxsurge Excuse me try this:

python3.11 -m pip3 install --upgrade dalle3

chelaxian commented 1 year ago

The reason you were encountering this error has a very simple explanation:

The file name was the same as the library you were trying to import.

example: You created dalle3.py

The file started with from dalle3 import Dalle [...] but since the file itself was named dalle3.py, it tried to import from itself which of course won't work.