Whether running as sudo or not, I started getting this message when running the script on macOS. It still seems to correctly poll the USB product IDs, so maybe it's just adding a bunch of noise on stdout?
2020-01-04 22:10:21.002 system_profiler[60780:2362795] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
Whether running as sudo or not, I started getting this message when running the script on macOS. It still seems to correctly poll the USB product IDs, so maybe it's just adding a bunch of noise on stdout?