LudovicRousseau / pyscard

pyscard smartcard library for python
http://pyscard.sourceforge.net/
GNU Lesser General Public License v2.1
403 stars 115 forks source link

Issue: TypeError: Can't instantiate abstract class CardConnectionDecorator without an implementation for abstract methods 'doControl', 'doGetAttrib', 'doTransmit' #175

Closed twolife closed 2 months ago

twolife commented 2 months ago

Your system information

Please describe your issue in as much detail as possible:

Describe what you expected should happen. (With v 2.0.10-1)

Python 3.12.6 (main, Sep  7 2024, 14:20:15) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from smartcard import System
>>> reader = System.readers()[0]
>>> reader
'Yubico YubiKey OTP+FIDO+CCID 00 00'
>>> c = reader.createConnection()
>>> c
<smartcard.CardConnectionDecorator.CardConnectionDecorator object at 0x7feb24f37ef0>

Describe what did happen.

Python 3.12.6 (main, Sep  7 2024, 14:20:15) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from smartcard import System
>>> reader = System.readers()[0]
>>> reader
'Yubico YubiKey OTP+FIDO+CCID 00 00'
>>> c = reader.createConnection()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/smartcard/pcsc/PCSCReader.py", line 101, in createConnection
    return CardConnectionDecorator(PCSCCardConnection(self.name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Can't instantiate abstract class CardConnectionDecorator without an implementation for abstract methods 'doControl', 'doGetAttrib', 'doTransmit'
LudovicRousseau commented 2 months ago

I guess it is a side effect of https://github.com/LudovicRousseau/pyscard/commit/546b7798fdb542f1c45fde2b946d7f9ab9770e24 by @laf0rge

laf0rge commented 2 months ago

sorry for the fall-out. Feel free to revert for now, I don't have time to jump at debugging it right now.

LudovicRousseau commented 2 months ago

New version 2.1.1 available.