I’m having some problems regarding the setup step of the PyLabRobot. So, I’m getting an error when trying to initialize_pipetting_channels
.
Some important context:
- I’m using WSL as my workspace, so I had to attach the USB device from Windows to WSL. Conectar dispositivos USB | Microsoft Learn
- I also had to create an udev rule because I was getting access denied from pyUSB. USBError: [Errno 13] Access denied (insufficient permissions) Ubuntu 16.04 · Issue #237 · pyusb/pyusb · GitHub
- At first I was the pylabrobot library imported by pip install (apparently it was an outdated version?) and I was getting another error related to ISWAP.
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Finding Hamilton USB device...
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Found Hamilton USB device.
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Found endpoints.
Write:
ENDPOINT 0x2: Bulk OUT ===============================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x2 OUT
bmAttributes : 0x2 Bulk
wMaxPacketSize : 0x40 (64 bytes)
bInterval : 0x0
Read:
ENDPOINT 0x81: Bulk IN ===============================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x81 IN
bmAttributes : 0x2 Bulk
wMaxPacketSize : 0x40 (64 bytes)
bInterval : 0x0
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Sent command: C0QWid0001
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Received response:
C0QWid0001er00/00qw0
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Running backend initialization procedure.
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Sent command: C0VIid0002
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Received response: C0VIid0002er00/00
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Sent command:
C0DIid0003xp08000&yp4050 3782 3514 3246 2978 2710 2442 2175tp2450tz1220te3600tm1&tt04ti0
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Received response: C0DIid0003er01/31
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Sent command: R0QWid0004
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Received response: R0QWid0004qw0
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Sent command: C0FIid0005
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Received response: C0FIid0005er00/00
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Sent command: C0PGid0006th2840
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Received response: C0PGid0006er99/00
R002/91
Traceback (most recent call last):
File "protocol.py", line 17, in <module>
asyncio.run(protocol())
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "protocol.py", line 15, in protocol
await lh.setup()
File "/home/isaacguerreir/.local/lib/python3.8/site
packages/pylabrobot/liquid_handling/liquid_handler.py", line 104, in setup
self.backend.setup()
File "/home/isaacguerreir/.local/lib/python3.8/site
packages/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 481, in setup
self.park_iswap()
File "/home/isaacguerreir/.local/lib/python3.8/site
packages/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 4088, in park_iswap
command_output = self.send_command(
File "/home/isaacguerreir/.local/lib/python3.8/site
packages/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 365, in send_command
return self.parse_response(res, fmt)
File "/home/isaacguerreir/.local/lib/python3.8/site
packages/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 299, in parse_response
raise he
pylabrobot.liquid_handling.backends.hamilton.errors.HamiltonFirmwareError: {'ISWAP': HardwareError('iSWAP not initialized. Call star.initialize_iswap().')}
-
After getting that
pip install pylabrobot
was not getting the last version of the library I made an installation using the source code. After that, I received a problem regarding initializing the pipetting channels. -
At first, I thought maybe some labware was being impediment to setup the machine, so I remove all of them, but it seems not be this.
SOURCE CODE
import asyncio
import logging
from pylabrobot.resources.hamilton import STARLetDeck
from pylabrobot.liquid_handling.backends.simulation.simulator_backend import SimulatorBackend
from pylabrobot.liquid_handling import LiquidHandler
from pylabrobotliquid_handling.liquid_handling.backends import STAR
logging.basicConfig(level = logging.DEBUG)
async def protocol():
backend = STAR()
lh = LiquidHandler(backend=backend, deck=STARLetDeck())
await lh.setup()
asyncio.run(protocol())
/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (2.0.1) or chardet (3.0.4) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported " DEBUG:asyncio:Using selector: EpollSelector INFO:pylabrobot.liquid_handling.backends.USBBackend:Finding USB device...
INFO:pylabrobot.liquid_handling.backends.USBBackend:Found USB device.
INFO:pylabrobot.liquid_handling.backends.USBBackend:Found endpoints.
Write:
ENDPOINT 0x2: Bulk OUT ===============================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x2 OUT
bmAttributes : 0x2 Bulk
wMaxPacketSize : 0x40 (64 bytes)
bInterval : 0x0
Read:
ENDPOINT 0x81: Bulk IN ===============================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x81 IN
bmAttributes : 0x2 Bulk
wMaxPacketSize : 0x40 (64 bytes)
bInterval : 0x0
INFO:pylabrobot.liquid_handling.backends.USBBackend:Sent command: C0RTid0001
DEBUG:pylabrobot.liquid_handling.backends.hamilton.STAR:Starting reading thread...
DEBUG:pylabrobot.liquid_handling.backends.USBBackend:Received data: bytearray(b'C0RTid0001er00/00rt0 0 0 0 0 0 0 0') INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Received response: C0RTid0001er00/00rt0 0 0 0 0 0 0 0 DEBUG:pylabrobot.liquid_handling.backends.hamilton.STAR:Reading thread stopped.
INFO:pylabrobot.liquid_handling.backends.USBBackend:Sent command: C0QMid0002
DEBUG:pylabrobot.liquid_handling.backends.hamilton.STAR:Starting reading thread...
DEBUG:pylabrobot.liquid_handling.backends.USBBackend:Received data: bytearray(b'C0QMid0002er00/00ka010001xt30xa30xw08000xl03xr00xm03500xx11400ys090xu3700xv3700yu0060kl360kc0yx0060ke00000000xn00xo00ym0060kr0km360')
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Received response: C0QMid0002er00/00ka010001xt30xa30xw08000xl03xr00xm03500xx11400ys090xu3700xv3700yu0060kl360kc0yx0060ke00000000xn00xo00ym0060kr0km360 DEBUG:pylabrobot.liquid_handling.backends.hamilton.STAR:Reading thread stopped.
INFO:pylabrobot.liquid_handling.backends.USBBackend:Sent command: C0QWid0003
DEBUG:pylabrobot.liquid_handling.backends.hamilton.STAR:Starting reading thread...
DEBUG:pylabrobot.liquid_handling.backends.USBBackend:Received data: bytearray(b'C0QWid0003er00/00qw0')
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Received response: C0QWid0003er00/00qw0
DEBUG:pylabrobot.liquid_handling.backends.hamilton.STAR:Reading thread stopped.
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Running backend initialization procedure.
INFO:pylabrobot.liquid_handling.backends.USBBackend:Sent command: C0VIid0004
DEBUG:pylabrobot.liquid_handling.backends.hamilton.STAR:Starting reading thread...
DEBUG:pylabrobot.liquid_handling.backends.USBBackend:Received data: bytearray(b'')
WARNING:pylabrobot.liquid_handling.backends.hamilton.STAR:Could not parse response:
DEBUG:pylabrobot.liquid_handling.backends.USBBackend:Received data: bytearray(b'C0VIid0004er00/00')
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Received response: C0VIid0004er00/00
DEBUG:pylabrobot.liquid_handling.backends.hamilton.STAR:Reading thread stopped.
INFO:pylabrobot.liquid_handling.backends.USBBackend:Sent command: C0DIid0005xp08000&yp4050 3783 3516 3249 2982 2715 2448 2181tp2450tz1220te3600tm1&tt04ti0 DEBUG:pylabrobot.liquid_handling.backends.hamilton.STAR:Starting reading thread...
DEBUG:pylabrobot.liquid_handling.backends.USBBackend:Received data: bytearray(b'C0DIid0005er01/31')
INFO:pylabrobot.liquid_handling.backends.hamilton.STAR:Received response: C0DIid0005er01/31
DEBUG:pylabrobot.liquid_handling.backends.hamilton.STAR:Reading thread stopped.
Traceback (most recent call last):
File "protocol.py", line 17, in <module>
asyncio.run(protocol())
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "protocol.py", line 15, in protocol
await lh.setup()
File "/home/isaacguerreir/workspace/personal/pylabrobot/pylabrobot/liquid_handling/liquid_handler.py", line 109, in setup
await self.backend.setup()
File "/home/isaacguerreir/workspace/personal/pylabrobot/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 607, in setup
await self.initialize_pipetting_channels(
File "/home/isaacguerreir/workspace/personal/pylabrobot/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 2725, in initialize_pipetting_channels
return await self.send_command(
File "/home/isaacguerreir/workspace/personal/pylabrobot/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 447, in send_command
return await fut
File "/home/isaacguerreir/workspace/personal/pylabrobot/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 506, in _continuously_read
parsed = self.parse_response(resp, fmt)
File "/home/isaacguerreir/workspace/personal/pylabrobot/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 396, in parse_response
raise he
pylabrobot.liquid_handling.backends.hamilton.errors.HamiltonFirmwareError: HamiltonFirmwareError({'Master': CommandSyntaxError('Unknown parameter (call lh.backend.request_name_of_last_faulty_parameter)')})
Any ideas of what could be happening?
One possible idea about what is happening for me it’s that the backend is for Hamilton Star, and my machine is a Starlet (my USB is recognized as 08af:8000 Microlab STAR
).