Skip to content

formatter error (circular import?) #3127

@wyli

Description

@wyli

Describe the bug
from formatter's log:

PYTHONPATH: /home/runner/work/monai-code-formatter/monai-code-formatter:
python: /opt/hostedtoolcache/Python/3.8.12/x64/bin/python
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/runner/work/monai-code-formatter/monai-code-formatter/monai/__init__.py", line 12, in <module>
    from .utils.module import load_submodules
  File "/home/runner/work/monai-code-formatter/monai-code-formatter/monai/utils/__init__.py", line 15, in <module>
    from .deprecated import DeprecatedError, deprecated, deprecated_arg
  File "/home/runner/work/monai-code-formatter/monai-code-formatter/monai/utils/deprecated.py", line 20, in <module>
    from .. import __version__
ImportError: cannot import name '__version__' from partially initialized module 'monai' (most likely due to a circular import) (/home/runner/work/monai-code-formatter/monai-code-formatter/monai/__init__.py)
Error: Process completed with exit code 1.

such as https://github.com/Project-MONAI/monai-code-formatter/runs/3890657244?check_suite_focus=true

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions