And I just realized what the issue was with the "Unknow units 
'unix-epoch'". Changed units from 'unix-epoch' to 'unix_epoch' and now it 
seems to be working. My older "csv-import.conf" is now working with the 
weectl import.

On Sunday, April 21, 2024 at 12:57:49 PM UTC-4 tarob...@gmail.com wrote:

> Using my old import-csv.conf file (attached), I get the following error:
>
> sudo weectl import --import-config=/home/piToad/Documents/csv-import.conf 
> --dry-runUsing configuration file /etc/weewx/weewx.conf
>
> This is a dry run. Nothing will actually be done.
> Starting weectl import...
> **** Unknown units 'unix-epoch' specified for field 'dateTime' in 
> /home/piToad/Documents/csv-import.conf.
> **** Nothing done, exiting.
>
> On Sunday, April 21, 2024 at 12:27:22 PM UTC-4 tarob...@gmail.com wrote:
>
>> 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'
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/34977516-8d00-4cb9-80ea-5b6d3ee8d333n%40googlegroups.com.

Reply via email to