Closed nipunbatra closed 10 years ago
Great work converting iAWE to NILM Metadata!!! I hope it wasn't too painful ;)
is there some of the stack trace missing??
Also, I can see some small errors in the YAML.
for example:
11: ¤t cost
And several like this:
description: >
(if you have no description then just don't include the field! Or delete the ">").
Is ¤t_cost
ok? I removed the empty descriptions and changed all occurences of current cost
to current_cost
.
Pardon my yaml novice skills. I just tried to copy stuff from REDD metadata.
Now, I get the following stack trace
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-10-68f3babaea88> in <module>()
----> 1 convert_iawe.convert_iawe("/home/nipun/Copy/Dataset/", "/home/nipun/Desktop/dataset_123.h5")
/home/nipun/git/nilmtk/nilmtk/dataset_converters/iawe/convert_iawe.pyc in convert_iawe(iawe_path, hdf_filename)
69 store.close()
70 convert_yaml_to_hdf5(join(_get_module_directory(), 'metadata'),
---> 71 hdf_filename)
72
73 print("Done converting iAWE to HDF5!")
/home/nipun/git/nilm_metadata/nilm_metadata/convert_yaml_to_hdf5.pyc in convert_yaml_to_hdf5(yaml_dir, hdf_filename)
51 elec_meters = building_metadata['elec_meters']
52 _deep_copy_meters(elec_meters)
---> 53 _set_data_location(elec_meters, building)
54 _sanity_check_meters(elec_meters, meter_devices)
55 _sanity_check_appliances(building_metadata)
/home/nipun/git/nilm_metadata/nilm_metadata/convert_yaml_to_hdf5.pyc in _set_data_location(elec_meters, building)
85 for meter_instance in elec_meters:
86 data_location = '/{:s}/elec/meter{:d}'.format(building, meter_instance)
---> 87 elec_meters[meter_instance]['data_location'] = data_location
88
89 def _sanity_check_meters(meters, meter_devices):
TypeError: 'NoneType' object does not support item assignment
Is ¤t_cost ok? I removed the empty descriptions and changed all occurences of current cost to current_cost.
I'm not sure why you want to include ¤t_cost
is you metadata? Are you using a Current Cost meter? The &
symbol is just used in YAML to label an object that you want to refer to later.
The wikipedia page on YAML is a pretty concise summary of the syntax: http://en.wikipedia.org/wiki/YAML
I think this will fix the error you're getting. I think the error is caused by the fact that meter 11 isn't a dict (which is what it should be ;)
Are you using a Current Cost meter?
Ya, I am! For 1 of the 12 appliance level load which required clamping!
The & symbol is just used in YAML to label an object that you want to refer to later.
As I had thought from previous usage of pointers in C/C++.
I think this will fix the error you're getting. I think the error is caused by the fact that meter 11 isn't a dict (which is what it should be ;)
Fixed it. I think specifying a detailed metadata would be non-trivial when done the first time.
Should we close this issue if it's fixed?
Stacktrace
building1.yaml
meter_devices.yaml
dataset.yaml