Missing backend when connecting to a hamilton star

I was able to get it to work following pyusb/docs/faq.rst at master · pyusb/pyusb · GitHub and installing libusb-package and running

# with pyocd/libusb-package for dev in libusb_package.find(find_all=True): print(dev)

But do I have to run this every time now? Or is there a way I can fix it permanently.

I see

Alternatively, the libusb 1.0 DLL can be manually copied from an official release archive into the C:\Windows\System32

But is the the solution and where do I find this DLL?

welcome to the forum :slight_smile:

I can’t immediately find the dll on the release pages of those repos, or instructions on how one would compile those. Perhaps running this method can reveal the location? pyusb/usb/backend/libusb1.py at 92da7b3ba25fb283ae2098cdfd9c9a46ca782144 · pyusb/pyusb · GitHub

I used Zadig to install libusb(K) on our windows machines. See the PLR installation instructions Installation — PyLabRobot documentation. I do see libusbK.dll and libusb0.dll files in Windows\System32.

1 Like

Thanks for the welcome :slight_smile:

What do you think about this fix? [libusb] add libusb to simplify installation by jkhales · Pull Request #88 · PyLabRobot/pylabrobot · GitHub

2 Likes

merged

3 Likes

Hey guys…is it possible this PR 88 merge broke something? I was testing some already working stuff without issue and decided to update in the middle of working given some recent issues, and now I can’t initialize anything.

With from pylabrobot.liquid_handling import LiquidHandler right away I get this error:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[2], line 3
      1 ## Initiate liquid handler and connect to robot
----> 3 from pylabrobot.liquid_handling import LiquidHandler
      4 from pylabrobot.liquid_handling.backends import STAR
      5 from pylabrobot.resources.hamilton import STARLetDeck

File ~/Documents/FutureHouse/Lab/PyLabRobot/pylabrobot/pylabrobot/liquid_handling/__init__.py:1
----> 1 from .backends import *
      2 from .liquid_handler import LiquidHandler
      3 from .standard import (
      4   Pickup,
      5   Drop,
   (...)
     12   Move
     13 )

File ~/Documents/FutureHouse/Lab/PyLabRobot/pylabrobot/pylabrobot/liquid_handling/backends/__init__.py:6
      3 from .serializing_backend import SerializingBackend, SerializingSavingBackend # many rely on this
      4 from .websocket import WebSocketBackend
----> 6 from .USBBackend import USBBackend
      7 from .hamilton.STAR import STAR
      8 from .hamilton.vantage import Vantage
...
----> 7 import libusb_package
      9 from pylabrobot.liquid_handling.backends.backend import LiquidHandlerBackend
     11 try:

ModuleNotFoundError: No module named 'libusb_package'

(I’m using a Mac, this thread originally seems to be about Windows though…)

this is because a new dependency was added. Running pip install libusb_package<=1.0.26.2 should fix it.

2 Likes

Thanks, makes sense.

1 Like