Skip to content

Bundler File Permission Error re Temp N-Triples File (Windows-Specific) #1315

@stevenchalem

Description

@stevenchalem

When I run the bundler under Windows, I get the error below. Apparently in materialize_subclass_inferences,py, in _run_reasoner() when the temporary n-triple file is passed to owlready2 the file is still open, so Windows doesn't allow owlready2 to read it.

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 "C:\\repos\\gist\\tools\\subclass_inferences\\materialize_subclass_inferences.py", line 103, 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 99, 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 63, 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 1015, in load\r\n    fileobj = open(f, "rb")\r\nPermissionError: [Errno 13] Permission denied: \'C:\\\\Users\\\\steve\\\\AppData\\\\Local\\\\Temp\\\\tmpqr_hc9y1.nt\'\r\n'

Metadata

Metadata

Assignees

Labels

area: infrastructurestatus: fast trackA low impact change for which a PR can be submitted without group discussion

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions