abcminiuser / python-elgato-streamdeck

Python library to control the Elgato Stream Deck.
Other
903 stars 134 forks source link

hidapi.dll not detected on Windows, even when on PATH #103

Closed spyoungtech closed 1 year ago

spyoungtech commented 1 year ago

Describe the bug

The documentation suggests that the hidapi.dll file can be placed into any directory on PATH:

Place the DLL into a folder that has been added to your system %PATH% directory list (typically this includes the C:\Windows\System32 folder but adding a new path would be recommended instead of modifying your Windows directory).

However, this does not appear to be the case (tested on Windows 10, Python 3.10). Even when placing the hidapi.dll file on PATH (or even in the same working directory). When attempting this, the following error is observed:

StreamDeck.DeviceManager.ProbeError: ('Probe failed to find any functional HID backend.', {'libusb': TransportError("No suitable LibUSB HIDAPI library found on this system. Is the 'hidapi.dll' library installed?")})

To Reproduce

  1. Create a new virtualenv and activate it (python -m venv venv, venv\Scripts\activate)
  2. Install streamdeck (pip install streamdeck)
  3. Download the libusb release and extract the hidapi.dll file to a directory on PATH. For convenience, the venv/Scripts directory works for this purpose (since it is on PATH by activating the virtualenv).
  4. Attempt to connect to the streamdeck, per examples. Observe that the error described above is presented.

System Information

Windows 10, Python 3.10

streamdeck version master@8b2dc90ebb52e146289ca9c99f3b3d6c92691b15 (most recent commit at time of writing)

abcminiuser commented 1 year ago

Fixed in 6753750bf2487b029947f3d61a5c51a640210d7b.