You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I cannot use Decetron2LayoutModel despite successfully install.
Usage of LP
lp.models.Detectron2LayoutModel(...)
lp.Detectron2LayoutModel(...)
Environment
On MacOS having M1 chip
'0.3.4' Version
With Pip Env on VSCode JupyterNotebook
Error traceback
AttributeError: partially initialized module 'layoutparser' has no attribute 'Detectron2LayoutModel' (most likely due to a circular import)
The text was updated successfully, but these errors were encountered:
This most likely not a bug. The error says it's most likely due to a circular import. This happens when the filename of the python program has the same name as another module it imports. So, in this case, I'm guessing the filename of your python program is layoutparser.py and it's calling import layoutparser as lp in it. Change the filename to something else, and it should work.
Describe the bug
I cannot use Decetron2LayoutModel despite successfully install.
Usage of LP
Environment
Error traceback
AttributeError: partially initialized module 'layoutparser' has no attribute 'Detectron2LayoutModel' (most likely due to a circular import)
The text was updated successfully, but these errors were encountered: