When I run

wee_database weewx.conf --reconfigure

I am getting python errors

Traceback (most recent call last):
  File "/usr/bin/wee_database", line 793, in <module>
    main()
  File "/usr/bin/wee_database", line 133, in main
    config_path, config_dict = weecfg.read_config(options.config_path, args)
  File "/usr/share/weewx/weecfg/__init__.py", line 223, in read_config
    config_dict = configobj.ConfigObj(config_path, file_error=True)
  File "/usr/lib/python2.7/dist-packages/configobj.py", line 1229, in 
__init__
    self._load(infile, configspec)
  File "/usr/lib/python2.7/dist-packages/configobj.py", line 1318, in _load
    raise error
configobj.DuplicateError: Duplicate keyword name at line 401.



On Sunday, December 9, 2018 at 1:51:15 PM UTC-8, Philip Kutzenco wrote:
>
> Dj,
>
> (I deleted the first version of this post as I left out a trailing "]" in 
> step 1).
>
> This is from instructions Pat gave me in the past to extend the schema:
>
> 1) Extend the database
>
> nano /usr/share/weewx/user/extensions.py
>
> then add the following:
>
>
> *import schemas.wviewschema_apptemp = schemas.wview.schema + 
> [('appTemp',   'REAL')]*
>
>
>
> 2) Stop weewx and edit weewx.conf to tell it to use this new schema 
> extension by adding the *schema = line* below to the [DataBindings] 
> stanza:
>
>
>
>
> *[DataBindings]    [[wx_binding]]        ...schema = 
> user.extensions.schema_apptemp*
>
>
>
> 3) Create a new copy of the database with the extended schema
>
> *wee_database weewx.conf --reconfigure*
> and then rename the databases
>
>
>
> 4) Rebuild the database with new daily values
>
> *Sudo wee_database --rebuild-daily*
>
>
>
> 5) restart weewx
>
> phil
>
> On Sunday, December 9, 2018 at 4:27:23 PM UTC-5, Dj Merrill wrote:
>>
>> Please forgive my ignorance.  It is not clear after reading the 
>> instructions on extending the database precisely what I should do in this 
>> case.  Obviously we don't have an "user/electricity.py" file, but we do 
>> have a "user/belchertown.py" file.
>>
>> Should I modify the "belchertown.py" file with something like:
>>
>> import schemas.wview
>> schema_with_apptemp = schemas.wview.schema + [('appTemp', 'REAL')]
>>
>>
>> Then modify weewx.conf to have:
>>
>> [DataBindings]
>>     [[wx_binding]]
>>         database = archive_sqlite
>>         table_name = archive
>>         manager = weewx.wxmanager.WXDaySummaryManager
>>         schema = user.belchertown.schema_with_apptemp
>>
>>
>> I am using SQLlite so I believe I can skip step 3.
>>
>> Then, "wee_database weewx.conf --reconfigure" and rename the databases?
>>
>> Thanks,
>>
>> -Dj
>>
>>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to