alan-turing-institute / uicc_identity_toolbox

A framework of Java Card applets for enhancing the trustworthiness of DigitalID systems using low-cost basic and feature phone devices.
MIT License
8 stars 1 forks source link

Adapt `setup_fs.py` for pysim version `1.0` #13

Open callummole opened 2 years ago

callummole commented 2 years ago

when running QR_based_applet/host/setup_fs.py

You get an import error like this for newer version of Pysim:

ImportError: cannot import name 'card_handler' from 'pySim.card_handler'

You need to update the host/setup_fs.py file to conform to the current version of pySim. Change two of the import statements as follows (note the inconsistent use of camelcase and underscores):

  from pySim.card_handler import CardHandler
  from pySim.cards import card_detect, SimCard

and change the use of the (old) card_handler class on line 120:

  cardhandler = CardHandler(sl)