In this case you have not specified any units for the ‘uv’ field in your 
CSV data, try something like:

        UV          = uv, uv_index

Gary

On Sunday, 24 October 2021 at 17:32:35 UTC+10 [email protected] wrote:

> OK, I move everything slowly:
> I placed everything in the "/etc/weewx/import" directory
>
> wee_import --import-config=/etc/weewx/import/trou.conf --dry-run
>
> Using WeeWX configuration file /etc/weewx/weewx.conf
> Starting wee_import...
> A CSV import from source file '/etc/weewx/import/data.csv' has been 
> requested.
> Using database binding 'wx_binding', which is bound to database 'weewx'
> Destination table 'archive' unit system is '0x10' (METRIC).
> This is a dry run, imported data will not be saved to archive.
> Starting dry run import ...
>
> Traceback (most recent call last):
>   File "/usr/share/weewx/wee_import", line 903, in <module>
>     main()
>   File "/usr/share/weewx/wee_import", line 833, in main
>     source_obj.run()
>   File "/usr/share/weewx/weeimport/weeimport.py", line 402, in run
>     _mapped_data = self.mapRawData(_raw_data, self.archive_unit_sys)
>   File "/usr/share/weewx/weeimport/weeimport.py", line 919, in mapRawData
>     self.map[_field]['units'],
> KeyError: 'units'
>
> Here is the "trou.conf" configuration file
>
>  source = CSV
>
> [CSV]
>
>     file = /etc/weewx/import/data.csv
>     delimiter = ;
>     decimal = ,
>     interval = conf
>     qc = True
>     calc_missing = False
>     ignore_invalid_data = True
>     tranche = 250
>     UV_sensor = True
>     solar_sensor = True
>     raw_datetime_format = %Y-%m-%d %H:%M:%S
>     rain = discrete
>     wind_direction = 0,360
>
>     [[FieldMap]]
>         dateTime    = date, unix_epoch
>         barometer   = pression, hPa
>         outTemp     = Temp, degree_C
>         outHumidity = Hum, percent
>         windSpeed   = Vent, km_per_hour
>         windDir     = Direction, degree_compass
>         rain        = Pluie, mm
>         dewpoint    = Rose, degree_C
>         radiation   = rayonnement, watt_per_meter_squared
>         UV          = uv
>
> et le fichier weewx.conf <https://pastebin.com/yZgJR3UP>
>
> Le samedi 23 octobre 2021 à 22:45:54 UTC+2, gjr80 a écrit :
>
>> Your import config file needs a source 
>> <http://weewx.com/docs/utilities.htm#General> entry and it appears it 
>> does not exist. Neither of your pastebin links appear to work. If you can’t 
>> solve the source problem just paste a copy of trou.conf here, can’t provide 
>> any further advice without seeing trou.conf.
>>
>> Gary
>>
>> On Saturday, 23 October 2021 at 21:10:14 UTC+10 [email protected] 
>> wrote:
>>
>>> Hello,
>>>
>>> I come back to you with my English comprehension problem -> French for 
>>> the Wee_import utility.
>>> The facts: I have a hole of a good month in my data (from 13/05/21 to 
>>> 19/06/21). As I am in the "Meteo Belgique" network, I was able to retrieve 
>>> some data in CSV format: https://pastebin.com/pccbnzhs
>>> I placed the configuration file (named "trou.conf") 
>>> https://pastebin.com/essg6rbp and the CSV in the /home/pi file
>>> The " wee_import --import-config=/home/pi/trou.conf --dry-run " returns:
>>>
>>> Using WeeWX configuration file /etc/weewx/weewx.conf
>>> Starting wee_import...
>>> Traceback (most recent call last):
>>>   File "/usr/share/weewx/weeimport/weeimport.py", line 302, in 
>>> sourceFactory
>>>     source = import_config_dict['source']
>>>   File "/usr/lib/python3/dist-packages/configobj.py", line 554, in 
>>> __getitem__
>>>     val = dict.__getitem__(self, key)
>>> KeyError: 'source'
>>>
>>> During handling of the above exception, another exception occurred:
>>>
>>> Traceback (most recent call last):
>>>   File "/usr/share/weewx/wee_import", line 903, in <module>
>>>     main()
>>>   File "/usr/share/weewx/wee_import", line 832, in main
>>>     args)
>>>   File "/usr/share/weewx/weeimport/weeimport.py", line 306, in 
>>> sourceFactory
>>>     _source_keys = [s for s in SUPPORTED_SOURCES if s in 
>>> import_config_dict.keys]
>>>   File "/usr/share/weewx/weeimport/weeimport.py", line 306, in <listcomp>
>>>     _source_keys = [s for s in SUPPORTED_SOURCES if s in 
>>> import_config_dict.keys]
>>> TypeError: argument of type 'method' is not iterable
>>>
>>>

-- 
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/5a096b18-d78b-4856-a346-e4b85666f217n%40googlegroups.com.

Reply via email to