-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
area: infrastructurestatus: fast trackA low impact change for which a PR can be submitted without group discussionA low impact change for which a PR can be submitted without group discussion
Description
When I run the bundler under Windows, I get
ERROR:root:Tool ['python', './tools/subclass_inferences/materialize_subclass_inferences.py', '--version', '14.0.0', 'gist14.0.0_webDownload/ontologies/gistSubClassAssertions14.0.0.ttl', 'gist14.0.0_webDownload/ontologies/gistCore14.0.0.ttl'] exited with 1: b'Traceback (most recent call last):\r\n File "owlready2_optimized.pyx", line 385, in owlready2_optimized.parse_rdfxml\r\nxml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 7\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File "C:\\Python\\Python313\\Lib\\site-packages\\owlready2\\driver.py", line 217, in do_parse\r\n if format == "rdfxml": owlready2_optimized.parse_rdfxml(f, queue, default_base, batch_size)\r\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File "owlready2_optimized.pyx", line 387, in owlready2_optimized.parse_rdfxml\r\nowlready2.base.OwlReadyOntologyParsingError: RDF/XML parsing error in file C:\\Users\\steve\\AppData\\Local\\Temp\\tmp8wgqf5u9.nt, line 1, column 7.\r\nTraceback (most recent call last):\r\n File "owlready2_optimized.pyx", line 385, in owlready2_optimized.parse_rdfxml\r\nxml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 7\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File "C:\\Python\\Python313\\Lib\\site-packages\\owlready2\\driver.py", line 217, in do_parse\r\n if format == "rdfxml": owlready2_optimized.parse_rdfxml(f, queue, default_base, batch_size)\r\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File "owlready2_optimized.pyx", line 387, in owlready2_optimized.parse_rdfxml\r\nowlready2.base.OwlReadyOntologyParsingError: RDF/XML parsing error in file C:\\Users\\steve\\AppData\\Local\\Temp\\tmp8wgqf5u9.nt, line 1, column 7.\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File "C:\\repos\\gist\\tools\\subclass_inferences\\materialize_subclass_inferences.py", line 105, in <module>\r\n _materialize_subclasses(sys.argv[1:])\r\n ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^\r\n File "C:\\repos\\gist\\tools\\subclass_inferences\\materialize_subclass_inferences.py", line 101, in _materialize_subclasses\r\n _run_reasoner(args.inputs, args.output, args.version)\r\n ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File "C:\\repos\\gist\\tools\\subclass_inferences\\materialize_subclass_inferences.py", line 65, in _run_reasoner\r\n ontology = get_ontology(f\'file://{temp_file.name}\').load()\r\n File "C:\\Python\\Python313\\Lib\\site-packages\\owlready2\\namespace.py", line 1016, in load\r\n try: new_base_iri = self.graph.parse(fileobj, default_base = self._orig_base_iri, **args)\r\n ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File "C:\\Python\\Python313\\Lib\\site-packages\\owlready2\\driver.py", line 267, in parse\r\n raise e\r\n File "C:\\Python\\Python313\\Lib\\site-packages\\owlready2\\driver.py", line 263, in parse\r\n onto_base_iri = do_parse(800000)\r\n File "C:\\Python\\Python313\\Lib\\site-packages\\owlready2\\driver.py", line 244, in do_parse\r\n queue.put(("error", e.args))\r\n ~~~~~~~~~^^^^^^^^^^^^^^^^^^^\r\n File "C:\\Python\\Python313\\Lib\\site-packages\\owlready2\\driver.py", line 53, in put\r\n elif command == "error": raise OwlReadyOntologyParsingError(*args)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nowlready2.base.OwlReadyOntologyParsingError: (\'error\', (\'RDF/XML parsing error in file C:\\\\Users\\\\steve\\\\AppData\\\\Local\\\\Temp\\\\tmp8wgqf5u9.nt, line 1, column 7.\',))\r\n'
This is a parsing error from owlready2 concerning the ntriple version of the ontology. I believe that Windows text encoding is corrupting ntriples.
Metadata
Metadata
Assignees
Labels
area: infrastructurestatus: fast trackA low impact change for which a PR can be submitted without group discussionA low impact change for which a PR can be submitted without group discussion