Skip to content

Circular Import Error: Cannot Import model_legacy in harmonic/utils.py #310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AB-physics opened this issue Apr 5, 2025 · 1 comment · May be fixed by #314
Open

Circular Import Error: Cannot Import model_legacy in harmonic/utils.py #310

AB-physics opened this issue Apr 5, 2025 · 1 comment · May be fixed by #314
Assignees

Comments

@AB-physics
Copy link

When running tests with pytest, I encounter a circular import error in harmonic/utils.py at the line:
from harmonic import model_legacy
This error occurs because harmonic/init.py imports utils, leading to a circular dependency. Please consider either moving this import inside the functions that use it (lazy import) or updating the import to the new location if model_legacy has been renamed.

@alicjapolanska
Copy link
Collaborator

Thank you for pointing this out @AB-physics ! We've moved the import to the inside of the function in #314.

@alicjapolanska alicjapolanska self-assigned this Apr 11, 2025
@alicjapolanska alicjapolanska linked a pull request Apr 11, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants