From: manas m. <man...@re...> - 2015-06-24 10:00:43
|
Hi, I'm using libusb along with pyusb to access the windows xp usb backend. So far my program worked fine till I installed newer versions in a difference machine on and from January 2015. The code is python to communicate with a cypress usb chip. The relevant part of the code is -------------import usb.core import usb.util import usb.backend.libusb0 as libusb01 import sys import time import ddsbackendbk = libusb01.get_backend() self.ddslist = usb.core.find(idVendor=0x04B4, idProduct=0x1236, backend = bk, find_all=True) # was it found? if self.ddslist is None: raise ValueError('DDS devices not found') ------------- It doesn't show the device giving the following massage: __init__ is calledTraceback (most recent call last): File "C:/Users/cqtwmanas/Desktop/experiment_control/experiment/src/DDS/ddsmain.py", line 323, in <module> myapp = MyForm() File "C:/Users/cqtwmanas/Desktop/experiment_control/experiment/src/DDS/ddsmain.py", line 28, in __init__ self.dds_list = dds.DDS_list() File "C:\Users\cqtwmanas\Desktop\experiment_control\experiment\src\DDS\dds.py", line 149, in __init__ self.ddsnum = len(self.ddslist)TypeError: object of type 'generator' has no len()------------------------- Any help in this regard is appriciated. best regardsMM |