from fontTools.feaLib.error import FeatureLibError import traceback font = CurrentFont() try: font.getRepresentation("defconQt.TTFont") except FeatureLibError as e: traceback.print_exc() print(e.location) else: print("C'est OKAY!")