Error while importing server module

Looks like you’re getting into a circular import situation, where HomeForm imports navigation, which imports AddMeasurementComponent, which then tries to import navigation again. The solution I normally see for that is to import at the function level in AddMeasurementComponent (and not at the module level), so something like:

def button_1_click(self, **event_args):
    from .. import navigation
    navigation.go_home()

Or to redesign things so you don’t need the circular import.

3 Likes