We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d336187 commit 0da019fCopy full SHA for 0da019f
pylabrobot/io/usb.py
@@ -16,8 +16,9 @@
16
import usb.util
17
18
USE_USB = True
19
-except ImportError:
+except ImportError as e:
20
USE_USB = False
21
+ _USB_IMPORT_ERROR = e
22
23
24
if TYPE_CHECKING:
@@ -304,7 +305,8 @@ async def setup(self):
304
305
306
if not USE_USB:
307
raise RuntimeError(
- "USB is not enabled. Please install pyusb and libusb. "
308
+ f"USB dependencies could not be imported due to the following error: {_USB_IMPORT_ERROR}. "
309
+ "Please install pyusb and libusb. "
310
"https://docs.pylabrobot.org/installation.html"
311
)
312
0 commit comments