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

LudovicRousseau / pyscard / 154
67%

Build:
DEFAULT BRANCH: master
Ran 27 Nov 2020 04:02PM UTC
Jobs 5
Files 65
Run time 65min
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

pending completion
154

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

2 of 2 new or added lines in 1 file covered. (100.0%)

837 of 2940 relevant lines covered (28.47%)

1.42 hits per line

Jobs
ID Job ID Ran Files Coverage
1 154.1 27 Nov 2020 04:02PM UTC 0
28.47
Travis Job 154.1
2 154.2 27 Nov 2020 04:03PM UTC 0
28.47
Travis Job 154.2
3 154.3 27 Nov 2020 04:02PM UTC 0
28.47
Travis Job 154.3
4 154.4 27 Nov 2020 04:02PM UTC 0
28.47
Travis Job 154.4
5 154.5 27 Nov 2020 05:07PM UTC 0
28.5
Travis Job 154.5
Source Files on build 154
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #154
  • 5a424cc4 on github
  • Prev Build on master (#152)
  • Next Build on master (#155)
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