-
Notifications
You must be signed in to change notification settings - Fork 34
Description
$ python alphasign_example.py
Traceback (most recent call last):
File "alphasign_example.py", line 37, in
main()
File "alphasign_example.py", line 6, in main
sign = alphasign.USB(alphasign.devices.USB_BETABRITE_PRISM)
AttributeError: 'module' object has no attribute 'USB'
$ python -V
Python 2.7.13
$ which python
/usr/local/bin/python
Platform is OSX Sierra 10.12.6, I'm using python 2.7 from homebrew. Betabrite Prism USB-only version connected via USB. I've installed alphasign, libusb, pyusb and pyserial via pip. I have also installed libusb via "brew install libusb".
The alphasign_example is your example code from readthedocs, copy and pasted.
Thanks for this full featured looking module, any assistance getting it working in my env is greatly appreciated.
Edit -- Device shows up to OSX as follows
USB-BULK Device:
Product ID: 0x1234
Vendor ID: 0x8765
Version: 0.01
Serial Number: 123456
Speed: Up to 12 Mb/sec
Manufacturer: ADAPTIVE
Location ID: 0x14100000 / 14
Current Available (mA): 500
Current Required (mA): 100
Extra Operating Current (mA): 0
which matches the constant from devices.py
- :const:
USB_BETABRITE_PRISM= (0x8765, 0x1234)
Edit 2 :
I look in /usr/local/lib/python2.7/site-packages/alphasign/interfaces/local.py and do not see a USB interface? grep -R USB in the base of the package does not find any results either.
Edit 3 :
Turns out homebrew + pip installs an ancient version of alphasign, 0.9, even though PyPi has 1.0.
I installed via
python setup.py install
from github head and my problem is resolved. Sorry for the noise, but hopefully it will be useful google fodder for future users.