You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@PaulHuwe ran into an error when supplying DataModel with a schema containing an object with no properties:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/phuwe/src/roman/romancal/romancal/datamodels/reference_files/referencefile.py", line 10, in __init__
super().__init__(init=init, **kwargs)
File "/Users/phuwe/anaconda3/envs/roman-dev/lib/python3.9/site-packages/stdatamodels/model_base.py", line 165, in __init__
self._schema = mschema.merge_property_trees(schema)
File "/Users/phuwe/anaconda3/envs/roman-dev/lib/python3.9/site-packages/stdatamodels/schema.py", line 202, in merge_property_trees
walk_schema(schema, callback)
File "/Users/phuwe/anaconda3/envs/roman-dev/lib/python3.9/site-packages/stdatamodels/schema.py", line 149, in walk_schema
recurse(schema, [], None, ctx)
File "/Users/phuwe/anaconda3/envs/roman-dev/lib/python3.9/site-packages/stdatamodels/schema.py", line 129, in recurse
recurse(sub, path, c, ctx)
File "/Users/phuwe/anaconda3/envs/roman-dev/lib/python3.9/site-packages/stdatamodels/schema.py", line 137, in recurse
recurse(val, path + [key], combiner, ctx)
File "/Users/phuwe/anaconda3/envs/roman-dev/lib/python3.9/site-packages/stdatamodels/schema.py", line 137, in recurse
recurse(val, path + [key], combiner, ctx)
File "/Users/phuwe/anaconda3/envs/roman-dev/lib/python3.9/site-packages/stdatamodels/schema.py", line 124, in recurse
if callback(schema, path, combiner, ctx, recurse):
File "/Users/phuwe/anaconda3/envs/roman-dev/lib/python3.9/site-packages/stdatamodels/schema.py", line 194, in callback
del schema['properties']
KeyError: 'properties'
This works fine in ASDF so it should probably work here as well. The use case is a schema that makes optional properties described in the core schema required.
The text was updated successfully, but these errors were encountered:
@PaulHuwe ran into an error when supplying DataModel with a schema containing an object with no properties:
This works fine in ASDF so it should probably work here as well. The use case is a schema that makes optional properties described in the core schema required.
The text was updated successfully, but these errors were encountered: