-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
0.14.1backlogbugSomething isn't workingSomething isn't workingin workready for verifyingsuccessfully tested
Milestone
Description
Hi Son,
the latest change in stabi branch has a side effect:
jsonLoads is not able any more to handle file imports (previously this worked fine).
This is the JSONP snippet:
jsonpStr = """{
"import_folder" : "dynamic_imports",
"file_name" : "imported.AA.jsonp",
"[import]" : "./${import_folder}/AA/${file_name}"
}
"""
Because of the import path is relative we need to define referenceDir.
The full path of the file to be imported is:
C:\workplace\ROBFW\TestTestcases\JsonPreprocessor\dynamic_imports\AA\imported.AA.jsonp
Therefore, referenceDir has to be: C:\workplace\ROBFW\TestTestcases\JsonPreprocessor
Full python code:
json_preprocessor = CJsonPreprocessor()
try:
retValues = json_preprocessor.jsonLoads(jsonpStr, referenceDir=r"C:\workplace\ROBFW\TestTestcases\JsonPreprocessor")
except Exception as reason:
sException = f"'{reason}'"
print()
printerror(sException)
Result:
Error: ''NoneType' object has no attribute 'getPathToRoot''!
But file should be imported and the content should be returned.
Metadata
Metadata
Assignees
Labels
0.14.1backlogbugSomething isn't workingSomething isn't workingin workready for verifyingsuccessfully tested
Projects
Status
Done