Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError while creating nPA #247

Closed
oldner opened this issue Feb 13, 2023 · 1 comment
Closed

TypeError while creating nPA #247

oldner opened this issue Feb 13, 2023 · 1 comment

Comments

@oldner
Copy link

oldner commented Feb 13, 2023

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
@frankmorgner
Copy link
Owner

fixed, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants