Skip to content

Circular Import Error (downscaling.py) #123

@msw17002

Description

@msw17002

Hello,

This problem occurs with the current source code (git clone 'this repository'). When I downloaded v0.0.22.tar.gz and reran the same script, the error didn't appear.

Both times, I used these commands to install Kalpana:

conda create --name kalpana python=3.11
conda activate Kalpana
pip install -e .

The error:

Traceback (most recent call last):
    from downscaling import meshRepLen2raster
  File "~/Kalpana/kalpana/downscaling.py", line 12, in <module>
    from kalpana.export import nc2shp, mesh2gdf, fort14togdf, readSubDomain # Changed
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/Kalpana/kalpana/kalpana.py", line 9, in <module>
    from downscaling import meshRepLen2raster, runStatic
ImportError: cannot import name 'meshRepLen2raster' from partially initialized module 'downscaling' (most likely due to a circular import) (~/Kalpana/kalpana/downscaling.py)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions