From fbe142651c3084197848d4861fd5af987ddd8b26 Mon Sep 17 00:00:00 2001 From: Jesper Friis Date: Fri, 22 Apr 2022 16:41:13 +0200 Subject: [PATCH] Corrected expected number with actual number of returned arguments --- examples/ontology-from-excel/make_microstructure_onto.py | 4 +++- ontopy/excelparser.py | 2 +- tools/excel2onto | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/ontology-from-excel/make_microstructure_onto.py b/examples/ontology-from-excel/make_microstructure_onto.py index 19664e507..de0171fe5 100755 --- a/examples/ontology-from-excel/make_microstructure_onto.py +++ b/examples/ontology-from-excel/make_microstructure_onto.py @@ -4,7 +4,9 @@ from ontopy.excelparser import create_ontology_from_excel from ontopy.utils import write_catalog -ontology, catalog = create_ontology_from_excel("tool/microstructure.xlsx") +ontology, catalog, errdict = create_ontology_from_excel( + "tool/microstructure.xlsx" +) ontology.save("microstructure_ontology.ttl", format="turtle", overwrite=True) write_catalog(catalog) diff --git a/ontopy/excelparser.py b/ontopy/excelparser.py index a5eb266f8..5655293f4 100755 --- a/ontopy/excelparser.py +++ b/ontopy/excelparser.py @@ -41,7 +41,7 @@ def create_ontology_from_excel( # pylint: disable=too-many-arguments imports: list = None, catalog: dict = None, force: bool = False, -) -> Tuple[ontopy.ontology.Ontology, dict]: +) -> Tuple[ontopy.ontology.Ontology, dict, dict]: """ Creates an ontology from an Excel-file. diff --git a/tools/excel2onto b/tools/excel2onto index 23e067a1e..0e00f962e 100755 --- a/tools/excel2onto +++ b/tools/excel2onto @@ -43,7 +43,7 @@ def main(): sys.exit(exc.code) # Exit without traceback on invalid arguments try: - ontology, catalog = create_ontology_from_excel( + ontology, catalog, _ = create_ontology_from_excel( args.excelpath, force=args.force ) except ExcelError as exc: