Error initializing Hamilton Star

I have followed the installation guide for the Hamilton:
https://docs.pylabrobot.org/installation.html#
And am trying to run the basic.ipynb notebook in docs. This has worked before but it does not work on any of the two Hamilton Starts i have available.

The error is:

--------------------------------------------------------------------------- IndexError Traceback (most recent call last) Cell In[7], line 1 ----> 1 await lh.setup() File [c:\users\vikmol\onedrive\dokumenter\github\pylabrobot_dalsa\pylabrobot\liquid_handling\liquid_handler.py:104](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/liquid_handling/liquid_handler.py:104), in LiquidHandler.setup(self) [101](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/liquid_handling/liquid_handler.py:101) if self.setup_finished: [102](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/liquid_handling/liquid_handler.py:102) raise RuntimeError(“The setup has already finished. See LiquidHandler.stop.”) → [104](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/liquid_handling/liquid_handler.py:104) await super().setup() [106](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/liquid_handling/liquid_handler.py:106) self.head = {c: TipTracker(thing=f"Channel {c}") for c in range(self.backend.num_channels)} [108](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/liquid_handling/liquid_handler.py:108) self.resource_assigned_callback(self.deck) File [c:\users\vikmol\onedrive\dokumenter\github\pylabrobot_dalsa\pylabrobot\machine.py:49](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/machine.py:49), in MachineFrontend.setup(self) [48](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/machine.py:48) async def setup(self): —> [49](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/machine.py:49) await self.backend.setup() [50](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/machine.py:50) self._setup_finished = True File [c:\users\vikmol\onedrive\dokumenter\github\pylabrobot_dalsa\pylabrobot\liquid_handling\backends\hamilton\STAR.py:1237](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/liquid_handling/backends/hamilton/STAR.py:1237), in STAR.setup(self) [1234](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/liquid_handling/backends/hamilton/STAR.py:1234) left_x_drive_configuration_byte_1 = left_x_drive_configuration_byte_1 + \ [1235](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/liquid_handling/backends/hamilton/STAR.py:1235) “0” * (16 - len(left_x_drive_configuration_byte_1)) [1236](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/liquid_handling/backends/hamilton/STAR.py:1236) left_x_drive_configuration_byte_1 = left_x_drive_configuration_byte_1[2:] → [1237](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/liquid_handling/backends/hamilton/STAR.py:1237) autoload_configuration_byte = bin(conf[“kb”]).split(“b”)[-1][-3] [1238](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/liquid_handling/backends/hamilton/STAR.py:1238) # Identify installations [1239](file:///C:/users/vikmol/onedrive/dokumenter/github/pylabrobot_dalsa/pylabrobot/liquid_handling/backends/hamilton/STAR.py:1239) self.autoload_installed = autoload_configuration_byte == “1” IndexError: string index out of range

could you print the output of self._extended_conf, retrieved on line 1224 in STAR.py?

this output should also be available in the PLR log file in pylabrobot-20240227.log

I have sent you an email with the log file in question.

1 Like

The issue was that the “configuration data 1” byte (kb03 in response of command RM) contained many leading zeros, which were cut when I convert the number to a Python binary string. I fixed by manually fixing the length to 8 zeros with zfill.

Thank you for reporting!

1 Like