LedgerHQ / btchip-python

Ledger HW.1 Python API
http://www.ledger.co
Apache License 2.0
65 stars 50 forks source link

argument count of the read function #6

Closed ulrichard closed 9 years ago

ulrichard commented 10 years ago

I'm in the process of packaging btchip-python for debian. For as long as pyusb is in beta, I created an intermediary package for pyusb v1 from https://github.com/walac/pyusb. Now I get errors TypeError: read() takes at most 4 arguments (5 given) about mismatching argument count between https://github.com/btchip/btchip-python/blob/master/btchip/btchipComm.py line 134 https://github.com/walac/pyusb/blob/master/usb/core.py line 351

On the other computer, where I installed pyusb with "sudo python setup.py install" from the git working copy, I don't get the problem.

Somebody with more insight is probably quicker than me to find out what's wrong.

btchip commented 9 years ago

Apparently at some point in time, read changed from

def read(self, endpoint, size, interface = None, timeout = None):

to

def read(self, endpoint, size_or_buffer, timeout = None):

and pip is still pointing to the older 1.0.0b1

not sure what's the best way to solve this, but I'll have a look (also migrate to hidapi if that's too messy)

btchip commented 9 years ago

Fixed in https://github.com/btchip/btchip-python/commit/c3398c527167cbc71e4a43ae06b93228b2a32153