diff --git a/autopilot/networking/station.py b/autopilot/networking/station.py index 05ea705a..a3c2bcce 100644 --- a/autopilot/networking/station.py +++ b/autopilot/networking/station.py @@ -1047,6 +1047,9 @@ def __init__(self): #self.id = prefs.get('NAME').encode('utf-8') self.id = prefs.get('NAME') + if self.id is None or self.id == '': + self.logger.exception(f"pilot NAME in prefs.json cannot be blank, got {self.id}") + raise ValueError(f"pilot NAME in prefs.json cannot be blank, got {self.id}") self.pi_id = "_{}".format(self.id) self.subject = None # Store current subject ID self.state = 'IDLE' # store current pi state