frankmorgner/vsmartcard

TypeError while creating nPA

Closed this issue · 1 comments

oldner commented

Expected behaviour

What should happen?

  • Generate nPA card without error.

Actual behaviour

What happens instead?

  • Gives error while trying to create nPA. It creates ISO successfully.

Steps to reproduce

  1. Change parser.add_option(..., default="nPA", ...) in CardGenerator.py default card to nPA from iso7816.
  2. run python CardGenerator.py OR vicc -t nPA on Ubuntu VM.

If I do something wrong, please let me know if there is another way to creating nPA card.

Logs

Please use Gist (https://gist.github.com/) or a similar code paster for longer
logs.

Traceback (most recent call last):
  File "/home/user/programming/vsmartcard/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py", line 722, in <module>
    generator.generateCard()
  File "/home/user/programming/vsmartcard/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py", line 680, in generateCard
    self.__generate_nPA()
  File "/home/user/programming/vsmartcard/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py", line 470, in __generate_nPA
    dg18 = pack([(0x72, 0, [(0x04, 0, bytes(CommunityID_Binary, "ascii"))])], True)
TypeError: encoding without a string argument

fixed, thanks