Skip to content

Conversation

@donalm
Copy link

@donalm donalm commented Jan 17, 2012

I ran into the following two exceptions when trying to run 01-reset.py (having modified it to use USB2Driver). My changes allow the script to run - it still hangs indefinitely on antnode.start() but I assume that's unrelated.

Traceback (most recent call last):
File "01-reset.py", line 25, in
antnode.start()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ant-develop-py2.7.egg/ant/core/node.py", line 158, in start
self.driver.open()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ant-develop-py2.7.egg/ant/core/driver.py", line 61, in open
self._open()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ant-develop-py2.7.egg/ant/core/driver.py", line 194, in _open
alternate_setting = usb.control.get_interface(dev, interface_number)
AttributeError: 'module' object has no attribute 'control'

Traceback (most recent call last):
File "01-reset.py", line 25, in
antnode.start()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ant-develop-py2.7.egg/ant/core/node.py", line 158, in start
self.driver.open()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ant-develop-py2.7.egg/ant/core/driver.py", line 62, in open
self._open()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ant-develop-py2.7.egg/ant/core/driver.py", line 198, in _open
AlternateSetting = alternate_setting
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/util.py", line 176, in find_descriptor
return _interop._next(desc_iter(k, v))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/_interop.py", line 60, in _next
return next(iter)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/util.py", line 164, in desc_iter
map(lambda i: getattr(d, i), k)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/util.py", line 164, in
map(lambda i: getattr(d, i), k)
AttributeError: 'Interface' object has no attribute 'AlternateSetting'

@DanAnkers
Copy link
Owner

Thanks for that - I'll check it this evening, merge and push it upstream.

@donalm
Copy link
Author

donalm commented Jan 17, 2012

That'd be great!

I had to update to alpha 2 of pyusb (pyusb-1.0.0a2) btw, to get the 'usb.control' module - I guess there's no way to specify that version in the requirements?

Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants