Skip to content

[Code Bug]: Intermittant Circular import issue #323

@jehsharp

Description

@jehsharp

Contact Details

No response

What happened?

When running the docs-check, sometimes, not all the time, it will fail due to circular import errors. Sometimes more files are affected. This is an example of that output:

`[autosummary] generating autosummary for: contributing.rst, example/camera_calibration/config.rst, example/camera_calibration/index.rst, example/csp/base_classes_and_ray_trace.ipynb, example/csp/config.rst, example/csp/index.rst, example/index.rst, example/mirror/config.rst, example/mirror/index.rst, example/scene_reconstruction/config.rst, ..., library_reference/common/lib/render/index.rst, library_reference/common/lib/render_control/config.rst, library_reference/common/lib/render_control/index.rst, library_reference/common/lib/target/config.rst, library_reference/common/lib/target/index.rst, library_reference/common/lib/tool/config.rst, library_reference/common/lib/tool/index.rst, library_reference/common/lib/uav/config.rst, library_reference/common/lib/uav/index.rst, library_reference/index.rst
WARNING: Failed to import opencsp.app.target.target_color.lib.ImageColor.
Possible hints:

  • AttributeError: module 'opencsp.app.target.target_color.lib' has no attribute 'ImageColor'
  • ImportError: cannot import name 'LoopXY' from partially initialized module 'opencsp.common.lib.geometry.LoopXY' (most likely due to a circular import) (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/geometry/LoopXY.py)
    WARNING: Failed to import opencsp.common.lib.csp.Facet.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.csp' has no attribute 'Facet'
    WARNING: Failed to import opencsp.common.lib.csp.FacetEnsemble.
    Possible hints:
  • AttributeError: module 'opencsp.common.lib.csp' has no attribute 'FacetEnsemble'
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
    WARNING: Failed to import opencsp.common.lib.csp.HeliostatAbstract.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.csp' has no attribute 'HeliostatAbstract'
    WARNING: Failed to import opencsp.common.lib.csp.HeliostatAzEl.
    Possible hints:
  • AttributeError: module 'opencsp.common.lib.csp' has no attribute 'HeliostatAzEl'
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
    WARNING: Failed to import opencsp.common.lib.csp.MirrorAbstract.
    Possible hints:
  • AttributeError: module 'opencsp.common.lib.csp' has no attribute 'MirrorAbstract'
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
    WARNING: Failed to import opencsp.common.lib.csp.MirrorParametric.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.csp' has no attribute 'MirrorParametric'
    WARNING: Failed to import opencsp.common.lib.csp.MirrorParametricRectangular.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.csp' has no attribute 'MirrorParametricRectangular'
    WARNING: Failed to import opencsp.common.lib.csp.MirrorPoint.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.csp' has no attribute 'MirrorPoint'
    WARNING: Failed to import opencsp.common.lib.csp.RayTrace.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.csp' has no attribute 'RayTrace'
    WARNING: Failed to import opencsp.common.lib.csp.RayTraceable.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.csp' has no attribute 'RayTraceable'
    WARNING: Failed to import opencsp.common.lib.csp.Scene.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.csp' has no attribute 'Scene'
    WARNING: Failed to import opencsp.common.lib.csp.SolarField.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.csp' has no attribute 'SolarField'
    WARNING: Failed to import opencsp.common.lib.csp.Tower.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.csp' has no attribute 'Tower'
    WARNING: Failed to import opencsp.common.lib.csp.StandardPlotOutput.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.csp' has no attribute 'StandardPlotOutput'
    WARNING: Failed to import opencsp.common.lib.geometry.FunctionXYContinuous.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.geometry' has no attribute 'FunctionXYContinuous'
    WARNING: Failed to import opencsp.common.lib.geometry.FunctionXYDiscrete.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.geometry' has no attribute 'FunctionXYDiscrete'
    WARNING: Failed to import opencsp.common.lib.geometry.FunctionXYGrid.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.geometry' has no attribute 'FunctionXYGrid'
    WARNING: Failed to import opencsp.common.lib.geometry.Intersection.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.geometry' has no attribute 'Intersection'
    WARNING: Failed to import opencsp.common.lib.geometry.LoopXY.
    Possible hints:
  • AttributeError: module 'opencsp.common.lib.geometry' has no attribute 'LoopXY'
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
    WARNING: Failed to import opencsp.common.lib.geometry.RegionXY.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.geometry' has no attribute 'RegionXY'
    WARNING: Failed to import example.sofast_calibration.example_calibrate_sofast_fixed_dot_locations.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'example.sofast_calibration' has no attribute 'example_calibrate_sofast_fixed_dot_locations'
    WARNING: Failed to import example.sofast_calibration.example_calibration_screen_shape.
    Possible hints:
  • AttributeError: module 'example.sofast_calibration' has no attribute 'example_calibration_screen_shape'
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
    WARNING: Failed to import example.csp.example_optics_and_ray_tracing.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'example.csp' has no attribute 'example_optics_and_ray_tracing'
    WARNING: Failed to import opencsp.common.lib.cv.OpticalFlow.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib' has no attribute 'cv'
    WARNING: Failed to import opencsp.common.lib.cv.image_filters.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib' has no attribute 'cv'
    WARNING: Failed to import opencsp.common.lib.cv.image_reshapers.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib' has no attribute 'cv'
    WARNING: Failed to import opencsp.common.lib.cv.fiducials.AbstractFiducials.
    Possible hints:
  • AttributeError: module 'opencsp.common.lib.cv.fiducials' has no attribute 'AbstractFiducials'
  • KeyError: 'opencsp.common.lib.cv'
    WARNING: Failed to import opencsp.common.lib.cv.fiducials.BcsFiducial.
    Possible hints:
  • KeyError: 'opencsp.common.lib.cv'
  • AttributeError: module 'opencsp.common.lib.cv.fiducials' has no attribute 'BcsFiducial'
    WARNING: Failed to import opencsp.common.lib.cv.fiducials.PointFiducials.
    Possible hints:
  • AttributeError: module 'opencsp.common.lib.cv.fiducials' has no attribute 'PointFiducials'
  • KeyError: 'opencsp.common.lib.cv'
    WARNING: Failed to import opencsp.common.lib.cv.annotations.AbstractAnnotations.
    Possible hints:
  • AttributeError: module 'opencsp.common.lib.cv.annotations' has no attribute 'AbstractAnnotations'
  • KeyError: 'opencsp.common.lib.cv'
    WARNING: Failed to import opencsp.common.lib.cv.annotations.HotspotAnnotation.
    Possible hints:
  • AttributeError: module 'opencsp.common.lib.cv.annotations' has no attribute 'HotspotAnnotation'
  • KeyError: 'opencsp.common.lib.cv'
    WARNING: Failed to import opencsp.common.lib.cv.annotations.PointAnnotations.
    Possible hints:
  • KeyError: 'opencsp.common.lib.cv'
  • AttributeError: module 'opencsp.common.lib.cv.annotations' has no attribute 'PointAnnotations'
    WARNING: Failed to import example.mirror.example_MirrorOutput.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'example.mirror' has no attribute 'example_MirrorOutput'
    WARNING: Failed to import example.solarfield.example_SolarFieldOutput.
    Possible hints:
  • AttributeError: module 'example.solarfield' has no attribute 'example_SolarFieldOutput'
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
    WARNING: Failed to import example.sofast_fixed.example_process_facet.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'example.sofast_fixed' has no attribute 'example_process_facet'
    WARNING: Failed to import example.sofast_fixed.example_find_blobs_in_image.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'example.sofast_fixed' has no attribute 'example_find_blobs_in_image'
    WARNING: Failed to import example.sofast_fixed.example_measurement_from_image.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'example.sofast_fixed' has no attribute 'example_measurement_from_image'
    WARNING: Failed to import example.sofast_fringe.single_facet.example_process_single_facet.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'example.sofast_fringe.single_facet' has no attribute 'example_process_single_facet'
    WARNING: Failed to import example.sofast_fringe.example_process_facet_ensemble.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'example.sofast_fringe' has no attribute 'example_process_facet_ensemble'
    WARNING: Failed to import example.sofast_fringe.example_process_undefined_shape.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'example.sofast_fringe' has no attribute 'example_process_undefined_shape'
    WARNING: Failed to import example.sofast_fringe.example_standard_mirror_plot_output.
    Possible hints:
  • AttributeError: module 'example.sofast_fringe' has no attribute 'example_standard_mirror_plot_output'
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
    WARNING: Failed to import example.sofast_fringe.example_process_in_debug_mode.
    Possible hints:
  • AttributeError: module 'example.sofast_fringe' has no attribute 'example_process_in_debug_mode'
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
    WARNING: Failed to import example.sofast_fringe.sofast_temperature_analysis.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'example.sofast_fringe' has no attribute 'sofast_temperature_analysis'
    WARNING: Failed to import example.sofast_fringe.sofast_command_line_tool.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'example.sofast_fringe' has no attribute 'sofast_command_line_tool'
    WARNING: Failed to import opencsp.common.lib.target.TargetColor.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.common.lib.target' has no attribute 'TargetColor'
    WARNING: Failed to import opencsp.common.lib.target.TargetAbstract.
    Possible hints:
  • AttributeError: module 'opencsp.common.lib.target' has no attribute 'TargetAbstract'
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
    WARNING: Failed to import opencsp.app.sofast.lib.ImageCalibrationAbstract.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.app.sofast.lib' has no attribute 'ImageCalibrationAbstract'
    WARNING: Failed to import opencsp.app.sofast.lib.ImageCalibrationGlobal.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.app.sofast.lib' has no attribute 'ImageCalibrationGlobal'
    WARNING: Failed to import opencsp.app.sofast.lib.ImageCalibrationScaling.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.app.sofast.lib' has no attribute 'ImageCalibrationScaling'
    WARNING: Failed to import opencsp.app.sofast.lib.MeasurementSofastFringe.
    Possible hints:
  • AttributeError: module 'opencsp.app.sofast.lib' has no attribute 'MeasurementSofastFringe'
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
    WARNING: Failed to import opencsp.app.sofast.lib.SofastInterface.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.app.sofast.lib' has no attribute 'SofastInterface'
    WARNING: Failed to import opencsp.app.sofast.lib.SystemSofastFringe.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.app.sofast.lib' has no attribute 'SystemSofastFringe'
    WARNING: Failed to import opencsp.app.sofast.lib.SofastConfiguration.
    Possible hints:
  • AttributeError: module 'opencsp.app.sofast.lib' has no attribute 'SofastConfiguration'
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
    WARNING: Failed to import opencsp.app.sofast.SofastGUI.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.app.sofast' has no attribute 'SofastGUI'
    WARNING: Failed to import opencsp.app.sofast.lib.CalibrateDisplayShape.
    Possible hints:
  • ImportError: cannot import name 'render' from 'opencsp.common.lib' (/home/runner/work/OpenCSP/OpenCSP/OpenCSP/opencsp/common/lib/init.py)
  • AttributeError: module 'opencsp.app.sofast.lib' has no attribute 'CalibrateDisplayShape'`

I need to track down exactly what is causing this to happend occasionally.

Version

Latest PR that went into develop

What OS are you seeing this on?

Windows

Relevant dependency versions

python script that produces the error

Relevant console output

Contribution Guidelines

  • I agree to follow this project's contribution guidelines

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions