• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LudovicRousseau / pyscard / 154 / 2
67%
master: 67%

Build:
DEFAULT BRANCH: master
Ran 27 Nov 2020 04:03PM UTC
Files 65
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Nov 2020 03:18PM UTC coverage: 28.469% (-0.02%) from 28.489%
154.2

push

travis-ci

LudovicRousseau
Handle bogus ACS ACR122U PICC reader

Fix `list index out of range` for mifare classic cards

Traceback (most recent call last):
  File "test.py", line 17, in <module>
    res = CARDSERVICE.connection.transmit(COMMAND, CARDSERVICE.connection.T1_protocol)
  File "/nix/store/n4c9kwr2471qkqqd8bw33rnkrk28agf1-python3.8-pyscard-1.9.9/lib/python3.8/site-packages/smartcard/CardConnectionDecorator.py", line 82, in transmit
    return self.component.transmit(bytes, protocol)
  File "/nix/store/n4c9kwr2471qkqqd8bw33rnkrk28agf1-python3.8-pyscard-1.9.9/lib/python3.8/site-packages/smartcard/CardConnection.py", line 146, in transmit
    data, sw1, sw2 = self.doTransmit(bytes, protocol)
  File "/nix/store/n4c9kwr2471qkqqd8bw33rnkrk28agf1-python3.8-pyscard-1.9.9/lib/python3.8/site-packages/smartcard/pcsc/PCSCCardConnection.py", line 205, in doTransmit
    sw1 = (response[-2] + 256) % 256
IndexError: list index out of range

The reader ACS ACR122U PICC may return an error code but without
indicating the CCID frame is an error. So the driver reports 0 bytes
with no error.

00000003 APDU: 00 A4 04 00 08 A0 00 00 05 27 47 11 17
00000002 ifdhandler.c:1302:IFDHTransmitToICC() usb:072f/2200:libudev:0:/dev/bus/usb/001/054 (lun: 0)
00000002 commands.c:1755:CmdXfrBlockTPDU_T0() T=0: 13 bytes
00000004 -> 000000 6F 0D 00 00 00 00 08 00 00 00 00 A4 04 00 08 A0 00 00 05 27 47 11 17
00006627 <- 000000 80 00 00 00 00 00 08 00 FE 00
00000017 SW:
00000005 winscard.c:1640:SCardTransmit() UnrefReader() count was: 2
00000004 winscard_svc.c:685:ContextThread() TRANSMIT rv=0x0 for client 15

The reader reports 0xFE (no card present) in Error byte but does not
indicate the frame is an error frame in the Status byte.

See " When trying to read Mifare classic card, there is an IndexError #101 "
https://github.com/LudovicRousseau/pyscard/issues/101

837 of 2940 relevant lines covered (28.47%)

0.28 hits per line

Source Files on job 154.2
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 152
  • Travis Job 154.2
  • 5a424cc4 on github
  • Prev Job for on master (#152.1)
  • Next Job for on master (#155.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc