Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No backend available #1

Closed
j6k4m8 opened this issue Aug 15, 2018 · 5 comments
Closed

No backend available #1

j6k4m8 opened this issue Aug 15, 2018 · 5 comments
Assignees

Comments

@j6k4m8
Copy link

j6k4m8 commented Aug 15, 2018

When running the test code from the readme, it throws this error:

NoBackendError                            Traceback (most recent call last)
<ipython-input-6-695313e87b17> in <module>()
----> 1 test = pybusylight.busylight()

~//pyBusylight/pybusylight.py in __init__(self, debug)
     18         self.ep = None
     19         self.debug = debug
---> 20         self.__connect_busylight__()
     21         self.red = 255
     22         self.green = 255

~//pyBusylight/pybusylight.py in __connect_busylight__(self)
     27
     28     def __connect_busylight__(self):
---> 29         dev = usb.core.find(idVendor=0x04d8, idProduct=0xf848)
     30
     31         if dev is None: raise ValueError('Device not found')

/usr/local/lib/python3.7/site-packages/usb/core.py in find(find_all, backend, custom_match, **args)
   1261                 break
   1262         else:
-> 1263             raise NoBackendError('No backend available')
   1264
   1265     if find_all:

NoBackendError: No backend available

This is the line that's failing:

dev = usb.core.find(idVendor=0x04d8, idProduct=0xf848)

[EDIT] The above line conflicts with my system's reported product/vendor IDs:

Product ID: 0x3bcd
Vendor ID: 0x27bb

@ericpulvino
Copy link
Owner

ericpulvino commented Aug 15, 2018

This looks to be an issue with the component of pyusb. Pyusb supports any of 3 different backends but they are not installed by default.

The most common backend is called libusb per pyusb/pyusb#120

If you're on a MAC you can install libusb via:
brew install libusb

On Windows you can follow the info here.
https://github.com/walac/pyusb/blob/master/README.rst#installing

On Ubuntu 16.04/18.04
sudo apt-get install libusb-1.0-0

What kind of system are you on?

@j6k4m8
Copy link
Author

j6k4m8 commented Aug 15, 2018

On a mac — libusb solved, thank you! Still having trouble with communicating with the light, but I'll see if I can figure it out before bugging you. Thank you!!

@ericpulvino
Copy link
Owner

Check out the example.py too to see all of the various things supported.

@ericpulvino
Copy link
Owner

Feel free to open another issue as well. Always happy to help. I've been meaning to put this in PyPi but I haven't gotten around to it yet.

@ericpulvino
Copy link
Owner

@j6k4m8 FYI I'm now catching this error in the most recent version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants