-
Notifications
You must be signed in to change notification settings - Fork 10
Description
With the latest commit (59e551a), the following error gets thrown when a cl-import statement contains an error (or wrong path) after Parse w/ Imports is selected in the GUI:
'NoneType' object has no attribute 'basepath'
The traceback in the console/terminal:
Traceback (most recent call last): File "/Users/cchui/Documents/GitHub/macleod/macleod/gui/gui_beta/gui_threads.py", line 45, in run self.path) File "/Users/cchui/Documents/GitHub/macleod/macleod/parsing/Parser.py", line 538, in parse_file ontology.resolve_imports(resolve) File "/Users/cchui/Documents/GitHub/macleod/macleod/Ontology.py", line 110, in resolve_imports new_ontology = Parser.parse_file(subbed_path, sub, base, resolve) File "/Users/cchui/Documents/GitHub/macleod/macleod/parsing/Parser.py", line 538, in parse_file ontology.resolve_imports(resolve) File "/Users/cchui/Documents/GitHub/macleod/macleod/Ontology.py", line 111, in resolve_imports new_ontology.basepath = self.basepath AttributeError: 'NoneType' object has no attribute 'basepath'
An example theory where this error occurred was in http://colore.oor.net/most/most.clif which had the incorrect nested import inside http://colore.oor.net/most/most_ringbond.clif:
(cl-imports http://colore.oor.net/most/most_group_definitions.clif)
was corrected to
(cl-imports http://colore.oor.net/most/definitions/most_group_definitions.clif)
A more helpful display in the GUI to the user would be to ask them to check the import statements.