We have the same problem here.
To reproduce the issue open a project in unreal and execute python script similar to this one:
asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
data_table_factory = unreal.DataTableFactory()
data_table_factory.struct = unreal.MaterialSubstitutionDataTable().static_struct()
table_asset = asset_tools.create_asset(asset_name="substitution_data_table",
json_string = open(r"c:\path\to\some\file.json").read()
You should get error message similar to this one:
The interesting thing is, that if I try to import the json file manually via UI, then the script runs without problems. So some variable or property is probably changed during Json data import. May be it is possible to set this variable to the correct value just before the ‘fill_data_table_from_json_string’ is called?
Another idea would be to set the value of the source file field to the desired json file. Does anyone know how it can be done with python?