cannot import name 'mydb' from partially initialized module 'connection' in Python

前端 未结 7 1522
南笙
南笙 2021-02-19 03:15

Python 3.8 error

ImportError: cannot import name \'mydb\' from partially initialized module \'connection\' 
(most likely due to a circular import) (C:\\U
sers\         


        
7条回答
  •  情书的邮戳
    2021-02-19 03:54

    As mentioned above, most likely you are using a code formatter which puts all the import statements at the top. Just go to settings and disable the format on save.

    Go to the file with error, correct the order of import statements and save.

提交回复
热议问题