Closed leileigong closed 4 years ago
Yes, it is the "expected" behaviour on Windows. See also https://github.com/LudovicRousseau/pyscard/issues/74
You should report the problem to Microsoft.
You can release the context before trying to list the readers
pyscard 1.9.8
Traceback (most recent call last): File "E:\FNTools\smartcard\CardMonitoring.py", line 162, in run currentcards = self.cardrequest.waitforcardevent() File "E:\FNTools\smartcard\CardRequest.py", line 73, in waitforcardevent return self.pcsccardrequest.waitforcardevent() File "E:\FNTools\smartcard\pcsc\PCSCCardRequest.py", line 305, in waitforcardevent readernames = self.getReaderNames() File "E:\FNTools\smartcard\pcsc\PCSCCardRequest.py", line 103, in getReaderNames raise ListReadersException(hresult) smartcard.Exceptions.ListReadersException: ('Failed to list readers', -2146435043)