Hello,
I am trying to import some missing data via CSV file. I've done this numerous times pre weewx 5.0 and weectl (using wee_import). I've setup a new import config file using the new layout for [[FieldMap]]. I've attached the import config I used. However, during the --dry-run I am getting the below error. I've attached the config file.
Column Headings:
['Timestamp','d5n1Temp', 'd5n1humid', 'd5n1Pres', 'rain5n1', 'windSpeed5n1',
'windAvg', 'windDir', 'UV', 'luminosity', 'd5n1Humid', 'rain',
'windSpeed', 'inTemp', 'inHumid', 'LiTemp', 'LiHumid', 'LiStrikes',
'LiDistance', 'LiPres', 'GTemp', 'GHumid', 'radiation']
It's a source_field error but can't figure out which source_field is giving the error. I've looked them over but could be missing one.
sudo weectl import --import-config=/home/piToad/Documents/csv-import-weectl.conf --dry-run
Using configuration file /etc/weewx/weewx.conf
This is a dry run. Nothing will actually be done.
Starting weectl import...
Traceback (most recent call last):
File "/usr/share/weewx/weectl.py", line 74, in <module>
main()
File "/usr/share/weewx/weectl.py", line 66, in main
namespace.func(namespace)
File "/usr/share/weewx/weectllib/__init__.py", line 121, in dispatch
namespace.action_func(config_dict, namespace)
File "/usr/share/weewx/weectllib/import_cmd.py", line 82, in import_func
weectllib.import_actions.obs_import(config_dict,
File "/usr/share/weewx/weectllib/import_actions.py", line 54, in obs_import
source_obj = weeimport.weeimport.Source.source_factory(config_dict['config_path'],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/weewx/weeimport/weeimport.py", line 316, in source_factory
return get_object(module_class)(config_path,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/weewx/weeimport/csvimport.py", line 110, in __init__
self.map = self.parse_map(_map,
^^^^^^^^^^^^^^^^^^^^
File "/usr/share/weewx/weeimport/weeimport.py", line 551, in parse_map
_mapped_source_fields = [config['source_field'] for field, config in _map.items()]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/weewx/weeimport/weeimport.py", line 551, in <listcomp>
_mapped_source_fields = [config['source_field'] for field, config in _map.items()]
~~~~~~^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/configobj/__init__.py", line 554, in __getitem__
val = dict.__getitem__(self, key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'source_field'