martinrusev / imbox

Python IMAP for Human beings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Error (most likely due to a circular import)

gilluc opened this issue · comments

I wanted to check the python imap code on your github page and i got:

PS D:\APPS_DEV_Dev_Sources\WINDOWS\Python> py imbox.py
Traceback (most recent call last):
File "D:\APPS_DEV_Dev_Sources\WINDOWS\Python\imbox.py", line 1, in
from imbox import Imbox
File "D:\APPS_DEV_Dev_Sources\WINDOWS\Python\imbox.py", line 1, in
from imbox import Imbox
ImportError: cannot import name 'Imbox' from partially initialized module 'imbox' (most likely due to a circular import) (D:\APPS_DEV_Dev_Sources\WINDOWS\Python\imbox.py)
PS D:\APPS_DEV_Dev_Sources\WINDOWS\Python> pip --version
pip 21.3.1 from C:\Users\bosley\AppData\Local\Programs\Python\Python39\lib\site-packages\pip (python 3.9)
PS D:\APPS_DEV_Dev_Sources\WINDOWS\Python> pip show imbox
Name: imbox
Version: 0.9.8
Summary: Python IMAP for Human beings
Home-page: https://github.com/martinrusev/imbox
Author: Martin Rusev
Author-email: martin@amon.cx
License: MIT
Location: c:\users\bosley\appdata\local\programs\python\python39\lib\site-packages
Requires: chardet
Required-by:
PS D:\APPS_DEV_Dev_Sources\WINDOWS\Python>

You called your script imbox and try to import imbox which is obviously a circular import. Just rename your script.

Fixed!