I’m sorry to ask something so basic, but I’ve installed pylabrobot, but get an error when attempting to import anything.
When I call
from pylabrobot.centrifuge import Centrifuge
I get the error:
ModuleNotFoundError: No module named ‘pylabrobot.centrifuge’
Same with the liquid handler class. Why am I getting this error? I’ve looked all over for some step I’m missing, but as far as I can tell, I’ve installed the software normally, but it gives an error when I try to run the first line of example code for any operation. Any advice?
Alright. I tried to install through git again and this time it worked! However now I’m trying to find guidance on how to actually connect to and initialize an Agilent VSpin centrifuge.
I can load the specific module, but I’m getting to an error here:
$ from pylabrobot.centrifuge import Centrifuge, VSpin
$ cf = Centrifuge(name = ‘centrifuge’, backend = VSpin(bucket_1_position=0), size_x= 1, size_y=1, size_z=1)
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\gross001\Projects\Pylabrobot\pylabrobot\pylabrobot\centrifuge\vspin.py”, line 34, in init
self.dev = Device(lazy_open=True, device_id=device_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\gross001\Projects\Pylabrobot\env\Lib\site-packages\pylibftdi\device.py”, line 201, in init
self.fdll = self.driver.fdll
^^^^^^^^^^^^^^^^
File “C:\Users\gross001\Projects\Pylabrobot\env\Lib\site-packages\pylibftdi\driver.py”, line 192, in fdll
self._fdll = self._load_library(“libftdi”)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\gross001\Projects\Pylabrobot\env\Lib\site-packages\pylibftdi\driver.py”, line 151, in _load_library
raise LibraryMissingError(
pylibftdi._base.LibraryMissingError: libftdi library not found (search: [‘ftdi1’, ‘libftdi1’, ‘ftdi’, ‘libftdi’])
$
The key error here appears to be LibraryMissingError pylibftdi._base.LibraryMissingError: libftdi library not found (search: [‘ftdi1’, ‘libftdi1’, ‘ftdi’, ‘libftdi’])
sorry about the lack of documentation on installation for the centrifuge. i have yet to update it.
there are two things to do on windows:
install libftdi. this is a library needed to communicate with the device
a. download the libftdi dlls from here: picusb - Browse Files at SourceForge.net. i got this one: libftdi1-1.5_devkit_x86_x64_19July2020.zip (download link)
b. in your virtualenv, look for the Scripts folder.
c. copy the dlls named “libftdi1.dll” and “libusb-1.0.dll” into the python/dlls folder (in the bin64 folder) into the Scripts folder.
use zadig to replace the driver of the device you are using with libusbk. i have instructions for this on the website: Installation — PyLabRobot documentation. substitute ‘ml_star’ with agilent centrifuge. happy to help if you have questions
I did step 1 and tested the command. I’m no longer getting the missing library error from before!
I haven’t yet attempted step 2, as I’m concerned about modifying my USB-related drivers. Is it safe? I’m worried some USB device might behave differently and I won’t know how to change it back.
I really appreciate your help, and I’d be happy to compose some documentation if you can help me get to the point where I can issue commands to the centrifuge and loader. Is there are rough starting guide of any kind? This is as far as I’ve gotten so far:
Once again, thank you so much for the quick and specific response.
I’ve gotten the basic module loaded, and I see the commands running it. But how do I specify the USB serial ports to use for the centrifuge and loader?
python -m pylibftdi.examples.list_devices to find device ids. unplug one or the other to see which is which. then pass the corresponding id in the device_id param to VSpin and Access2.
This is all amazing. I’ll try it out and get back to you.
I’m a field service engineer for Agilent (who makes this centrifuge and loader), so I don’t actually have a centrifuge available each day, just when I encounter them in the wild. But I should get a chance today.
Also, is there a way I can contribute to this? I’m very enthusiastic about writing and editing documentation for this kind of project.
more documentation is always a great contribution, and this thread is one of the embarrassing examples showing why. we don’t have installation instructions for the vspin up to date. If you’re feeling super motivated, a consolidated version of this thread would be super nice as an addition to the installation guide. The docs are all markdown/notebooks and there is an “Edit on GitHub” link right on every docs page
I’ll do it! If I get this working, I’ll definitely write up a guide.
Do you have any advice on getting involved with the project? Are there any other developers, and do you hold any developer meetings or office hours when I could discuss the project?
I’ll be a little out of contact during the holidays, but after I get back I’d like to keep this conversation going, and see how I can contribute.
thanks in advance! and no pressure, ever. & happy holidays!
make PRs on github and post on the forum! there is no secret
we had a developer meeting once almost a year ago, but i think the conclusion at that time was that asynchronous communication on github/the forum is more productive. But if there’s interest (we have grown the number of developers/users quite a bit since then) I’d be happy to organize another one to see how people feel. I will make a new post about it.
I guess I am the benevolent dictator of the project, but plr is obviously developed by many people (check the github page). You can recognize developers on the forum by their tag (i apply this tag when someone has a merged PR). Camillo @CamilloMoschner has a special tag. To ‘meet’ people, just continue making posts and people will respond it’s all just chill
It looks good. I have to wait until the next time I encounter a centrifuge to test the serial address lookup method, but in the meantime perhaps you can help with this: the command
from pylabrobot import Centrifuge
Elicits the error “ImportError: cannot import name ‘Centrifuge’ from ‘pylabrobot’ (unknown location)”
Also
from pylabrobot.backends.vspin import VSpin
Elicits "ModuleNotFoundError: No module named ‘pylabrobot.backends’ "
This is on Windows 11 running on Spyder. I can import pylabrobot successfully. Do you have any advice?
from pylabrobot.centrifuge import Centrifuge, VSpin
# Replace with your specific FTDI device ID and bucket position for profile in Agilent Centrifuge Config Tool.
backend = VSpin(bucket_1_position=6969, device_id="XXXXXXXX")
centrifuge = Centrifuge(
backend=backend,
name="centrifuge",
size_x=1, size_y=1, size_z=1
)
# Initialize the centrifuge.
await centrifuge.setup()