-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Describe the bug
generalize-tsvs enum creation in some datasets causes exception crash in schema_as_dict due to enum type being string not dict.
To Reproduce
I'm not certain the specific details yet but my current data set causes the crash, I'm still hunting down the specific issue. A different data set does not have the issue.
Expected behavior
Create the schema without raising an exception and crashing.
Code snippets
This is where we're crashing.
obj = json_dumper.to_dict(schema)
if '@type' in obj:
del obj['@type']
obj['prefixes'] = {k: v['prefix_reference'] for k, v in obj.get('prefixes', {}).items()}
for k, v in obj.get('enums', {}).items():
for pv in v.get('permissible_values', {}).values():
del pv['text']
I'm going to try putting in a exception handler to give more information on what the data looks like.