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
With the new processing configs I am testing the functionality of writing to json (works fine) and reading from json (not working).
I created an outline of a test for this on branch dev in aurora/test_utils/synthetic/make_processing_configs_new.py
The test is called test_to_from_json()
The output json is created, and it is read-in but something happens on line 659 of mt_metadata/mt_metadata/base/metadata.py on the call to self.from_dict(json_dict) .. maybe too many layers of nested dicts? The error message is pasted below
Traceback (most recent call last):
File "/home/kkappler/software/irismt/mt_metadata/mt_metadata/base/metadata.py", line 455, in set_attr_from_name
helpers.recursive_split_setattr(self, name, value)
File "/home/kkappler/software/irismt/mt_metadata/mt_metadata/base/helpers.py", line 334, in recursive_split_setattr
recursive_split_setattr(base_object, other[0], value)
File "/home/kkappler/software/irismt/mt_metadata/mt_metadata/base/helpers.py", line 334, in recursive_split_setattr
recursive_split_setattr(base_object, other[0], value)
File "/home/kkappler/software/irismt/mt_metadata/mt_metadata/base/helpers.py", line 336, in recursive_split_setattr
setattr(base_object, key, value)
File "/home/kkappler/software/irismt/mt_metadata/mt_metadata/base/metadata.py", line 334, in __setattr__
super().__setattr__(name, value)
File "/home/kkappler/software/irismt/aurora/aurora/config/metadata/station.py", line 45, in runs
run.from_dict(item)
File "/home/kkappler/software/irismt/mt_metadata/mt_metadata/base/metadata.py", line 616, in from_dict
self.set_attr_from_name(name, value)
File "/home/kkappler/software/irismt/mt_metadata/mt_metadata/base/metadata.py", line 466, in set_attr_from_name
setattr(self, name, value)
File "/home/kkappler/software/irismt/mt_metadata/mt_metadata/base/metadata.py", line 344, in __setattr__
test_property.fset(self, value)
File "/home/kkappler/software/irismt/aurora/aurora/config/metadata/run.py", line 100, in time_periods
raise TypeError(f"not sure what to do with type {type(item)}")
TypeError: not sure what to do with type <class 'dict'>
Process finished with exit code 1
The text was updated successfully, but these errors were encountered:
With the new processing configs I am testing the functionality of writing to json (works fine) and reading from json (not working).
I created an outline of a test for this on branch
dev
inaurora/test_utils/synthetic/make_processing_configs_new.py
The test is called
test_to_from_json()
The output json is created, and it is read-in but something happens on line 659 of
mt_metadata/mt_metadata/base/metadata.py
on the call to self.from_dict(json_dict) .. maybe too many layers of nested dicts? The error message is pasted belowThe text was updated successfully, but these errors were encountered: