ESDL validator crashes which shows an 'Internal server error' to the user of ESDL Mapeditor.
Steps to reproduce the problem
Load accompanied esdl in mapeditor at nwn-design-toolkit-poc.nl [Uploading 2024-04-04.esdl_with_validator_issue.esdl.txt…]()
Start the esdl validator
Note the internal server error displayed
What should have happened?
The issue with the ESDL should have been shown.
What browsers do you use to access the UI?
Mozilla Firefox
Additional information
Stacktrace from esdl-validator:
2024-04-04T10:00:58+0000 | esdlvalidator.api.manage | ERROR | Exception on /validationToMessages/ [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1517, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1503, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/usr/local/lib/python3.8/site-packages/flask_restx/api.py", line 403, in wrapper
resp = resource(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/flask/views.py", line 84, in view
return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/flask_restx/resource.py", line 49, in dispatch_request
resp = meth(*args, **kwargs)
File "/home/esdluser/esdlvalidator/api/controller/validationToMessages.py", line 36, in post
result = validationService.validateContents(file, schema_list)
File "/home/esdluser/esdlvalidator/api/service/validation.py", line 64, in validateContents
result = self.__validator.validate(self.esdl, schemas)
File "/home/esdluser/esdlvalidator/validation/validator.py", line 35, in validate
schemaResult = self.__run_schema(schema, esdl)
File "/home/esdluser/esdlvalidator/validation/validator.py", line 46, in __run_schema
validationResult = self.__run_validation(validation, esdl)
File "/home/esdluser/esdlvalidator/validation/validator.py", line 57, in __run_validation
checkResults = self.__run_check(check, datasets)
File "/home/esdluser/esdlvalidator/validation/validator.py", line 88, in __run_check
checkResult = self.__run_get_check_result(cleanCheck, datasets, entry)
File "/home/esdluser/esdlvalidator/validation/validator.py", line 101, in __run_get_check_result
checkResult = FunctionFactory.create(FunctionType.CHECK, functionName, datasets=datasets, value=entry,
File "/home/esdluser/esdlvalidator/validation/functions/function.py", line 164, in create
function = function_class(**kwargs)
File "/home/esdluser/esdlvalidator/validation/functions/function.py", line 104, in __init__
self._run()
File "/home/esdluser/esdlvalidator/validation/functions/function.py", line 75, in _run
self.result = self.execute()
File "/home/esdluser/esdlvalidator/validation/functions/check_child_attribute_not_null.py", line 127, in execute
resultcheck = self.check_units(self.args["attribute"], qau)
File "/home/esdluser/esdlvalidator/validation/functions/check_child_attribute_not_null.py", line 167, in check_units
unittype = getattr(qau, self.args["unit_type"][i])
AttributeError: 'NoneType' object has no attribute 'unit'
Is there an existing issue for this?
What happened?
Found together with jurrian.visser@rhdhv.com
ESDL validator crashes which shows an 'Internal server error' to the user of ESDL Mapeditor.
Steps to reproduce the problem
What should have happened?
The issue with the ESDL should have been shown.
What browsers do you use to access the UI?
Mozilla Firefox
Additional information
Stacktrace from esdl-validator: