I'm trying to use wee_import (in weewx 3.9.2) to fill in a gap in my
records using data extracted from an external source.
I've created a CSV with the following header line:
timestamp,outTemp,outHumidity,barometer,altimeter,windSpeed,windDir,gustSpeed,gustDir,rainRate,rain
The first data row looks like this:
1584821700,40.71,58,1010,129.00,3.2,135,7.6,45,0.00,0.00
I have the following fields defined in the csv-import.conf
[[FieldMap]]
dateTime = timestamp, unix_epoch
barometer = barometer, mbar
altimeter = altimeter, meter
outTemp = outTemp, degree_F
outHumidity = outHumidity, percent
windSpeed = windSpeed, mile_per_hour
windDir = windDir, degree_compass
windGust = gustSpeed, mile_per_hour
windGustDir = gustDir, degree_compass
rainRate = rainRate, inch_per_hour
rain = rain, inch
The import is complaining about a unit conversion issue:
wee_import --import-config=csv-import.conf --dry-run --log=csv-import.log
--verbose
Starting wee_import...
A CSV import from source file 'bloomsky_hillside_combined.csv' has been
requested.
The following options will be used:
config=/etc/weewx/weewx.conf, import-config=csv-import.conf
source=bloomsky_hillside_combined.csv, from=None, to=None
dry-run=True, calc_missing=True, ignore_invalid_data=True
tranche=250, interval=5, date/time_string_format=%Y-%m-%d %H:%M:%S
rain=cumulative, wind_direction=[-360.0, 360.0]
UV=False, radiation=False
Using database binding 'wx_binding', which is bound to database 'weewx.sdb'
Destination table 'archive' unit system is '0x01' (US).
Missing derived observations will be calculated.
All WeeWX UV fields will be set to None.
All WeeWX radiation fields will be set to None.
This is a dry run, imported data will not be saved to archive.
Obtaining raw import data for period 1...
The following imported field-to-WeeWX field map will be used:
source field 'barometer' in units 'mbar' --> WeeWX field 'barometer'
source field 'outHumidity' in units 'percent' --> WeeWX field 'outHumidity'
source field 'rainRate' in units 'inch_per_hour' --> WeeWX field 'rainRate'
source field 'rain' in units 'inch' --> WeeWX field 'rain'
source field 'timestamp' in units 'unix_epoch' --> WeeWX field 'dateTime'
source field 'windDir' in units 'degree_compass' --> WeeWX field 'windDir'
source field 'outTemp' in units 'degree_F' --> WeeWX field 'outTemp'
source field 'windSpeed' in units 'mile_per_hour' --> WeeWX field
'windSpeed'
source field 'gustSpeed' in units 'mile_per_hour' --> WeeWX field
'windGust'
source field 'altimeter' in units 'meter' --> WeeWX field 'altimeter'
source field 'gustDir' in units 'degree_compass' --> WeeWX field
'windGustDir'
Raw import data read successfully for period 1.
Mapping raw import data for period 1...
Traceback (most recent call last):
File "/usr/bin/wee_import", line 834, in <module>
main()
File "/usr/bin/wee_import", line 784, in main
source_obj.run()
File "/usr/share/weewx/weeimport/weeimport.py", line 350, in run
_mapped_data = self.mapRawData(_raw_data, self.archive_unit_sys)
File "/usr/share/weewx/weeimport/weeimport.py", line 723, in mapRawData
_conv_vt = convertStd(_temp_vt, unit_sys)
File "/usr/share/weewx/weewx/units.py", line 1161, in convertStd
return StdUnitConverters[target_std_unit_system].convert(val_t)
File "/usr/share/weewx/weewx/units.py", line 784, in convert
new_val_t = convert(val_t, new_unit_type)
File "/usr/share/weewx/weewx/units.py", line 1128, in convert
conversion_func = conversionDict[val_t[1]][target_unit_type]
KeyError: 'inHg'
I've burrowed down various rabbit holes, but not come up with anything.
Any ideas what I've got wrong?
--
73, Rick, M0LEP
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/7eb8.5e9d8274.e9d55%40hewett.org.