[weewx-user] Database Problem

2020-05-27 Thread Phil Owers
Have just tried to add avg_distance and lightning_strikes to the weewx.sdb. 
schema by adding
import schemas.wview
schema_extended = schemas.wview.schema + [('avg_distance', 
'REAL'),('lightning_strikes', 'REAL')]
in the extension.py file
and in the weewx.conf
 changed schema = schemas.wview_extended.schema
 to schema = user.extensions.schema_extended
then
sudo ./bin/wee_database weewx.conf --reconfigure

The new weewx.sdb was produced and so I then did --rebuild-daily.
Restarted weewx and started getting a failure with $day.wind.max and also 
the following was produced in the log with 
May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread:  
data = self.calculate(cached_packet)
May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread:    
File "/home/weewx/bin/user/rtgd.py", line 1926, in calculate
May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread:  
wgust_tm_vt = ValueTuple(self.day_stats['wind'].max,
May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread:  
KeyError: 'wind'

Had a look at the old and new weew.sdb and in the database file structure 
the tables had gone from 114 Table Schema in the original to 54 Table 
Schema after I had done the above change with daily_archive_wind missing 
with lots of others.
Reverted back to the original weewx.sdb and it was Ok again.
Im using weewx Ver 4.1
Just wondered if there was a different way of doing the above since version 
4
Thanks for any help
Phil

-- 
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/b4a60685-724e-4260-834e-3589af69dcba%40googlegroups.com.


Re: [weewx-user] Database Problem

2020-05-27 Thread Tom Keffer
There are now two ways of specifying a database schema. In the old way, the
presence of 'wind' was detected by setting the database manager to
WXDaySummaryManager. In the new way, it is explicitly mentioned in the
schema.

Unfortunately, you're mixing the two ways.

If you wish to use the old way, make sure that option 'manager' is set to
WXDaySummaryManager. So, your section [DataBindings] should read something
like

[DataBindings]

[[wx_binding]]
# The database must match one of the sections in [Databases].
# This is likely to be the only option you would want to change.
database = archive_sqlite
# The name of the table within the database
table_name = archive
# The manager handles aggregation of data for historical summaries
manager = weewx.wxmanager.WXDaySummaryManager
# The schema defines the structure of the database.
# It is *only* used when the database is created.
schema = user.extensions.schema_extended

Then try creating the new database.

An obscure error, I know!

-tk


On Wed, May 27, 2020 at 4:06 PM Phil Owers  wrote:

> Have just tried to add avg_distance and lightning_strikes to the
> weewx.sdb. schema by adding
> import schemas.wview
> schema_extended = schemas.wview.schema + [('avg_distance',
> 'REAL'),('lightning_strikes', 'REAL')]
> in the extension.py file
> and in the weewx.conf
>  changed schema = schemas.wview_extended.schema
>  to schema = user.extensions.schema_extended
> then
> sudo ./bin/wee_database weewx.conf --reconfigure
>
> The new weewx.sdb was produced and so I then did --rebuild-daily.
> Restarted weewx and started getting a failure with $day.wind.max and also
> the following was produced in the log with
> May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread:
>  data = self.calculate(cached_packet)
> May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread: 
> File "/home/weewx/bin/user/rtgd.py", line 1926, in calculate
> May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread:
>  wgust_tm_vt = ValueTuple(self.day_stats['wind'].max,
> May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread: 
> KeyError: 'wind'
>
> Had a look at the old and new weew.sdb and in the database file structure
> the tables had gone from 114 Table Schema in the original to 54 Table
> Schema after I had done the above change with daily_archive_wind missing
> with lots of others.
> Reverted back to the original weewx.sdb and it was Ok again.
> Im using weewx Ver 4.1
> Just wondered if there was a different way of doing the above since
> version 4
> Thanks for any help
> Phil
>
> --
> 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/b4a60685-724e-4260-834e-3589af69dcba%40googlegroups.com
> 
> .
>

-- 
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/CAPq0zECDq%2Biig%3DNTfNkx%3DWAxBSL947QPvq7ta8AQ4U4UicRjwg%40mail.gmail.com.


Re: [weewx-user] Database Problem

2020-05-28 Thread Michi Kaa
Today I moved to user.extensions.schema_extended, but when i ran 
--rebuild-daily (or reconfigure, I really can't remember) I got an error 
that there is no "weewx.wxmanager.DaySummaryManager". I checked 
/usr/share/weewx/weewx/wxmanager.py and there is no such class. But there 
is "weewx.manager.DaySummaryManager" - so are the config examples with


# The manager handles aggregation of data for historical summaries
manager = weewx.wxmanager.DaySummaryManager

just typos?

-- 
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/fd6f4b2c-23eb-428d-a6fe-0ac97856613c%40googlegroups.com.


Re: [weewx-user] Database Problem

2020-05-28 Thread John Kline
You are missing the bin directory in the path you say you checked.

Would you check /usr/share/weewx/bin/weewx/wxmanager.py?

The class is there.  See:   
https://github.com/weewx/weewx/blob/master/bin/weewx/manager.py

> On May 28, 2020, at 1:23 AM, Michi Kaa  wrote:
> 
> 
> Today I moved to user.extensions.schema_extended, but when i ran 
> --rebuild-daily (or reconfigure, I really can't remember) I got an error that 
> there is no "weewx.wxmanager.DaySummaryManager". I checked 
> /usr/share/weewx/weewx/wxmanager.py and there is no such class. But there is 
> "weewx.manager.DaySummaryManager" - so are the config examples with
> 
> 
> # The manager handles aggregation of data for historical summaries
> manager = weewx.wxmanager.DaySummaryManager
> 
> just typos?
> -- 
> 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/fd6f4b2c-23eb-428d-a6fe-0ac97856613c%40googlegroups.com.

-- 
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/DE9F6341-9CD8-4B94-A1BB-7EF3128E572B%40johnkline.com.


Re: [weewx-user] Database Problem

2020-05-28 Thread Tom Keffer
Yes, unfortunately they are typos. They should read

manager = weewx.manager.DaySummaryManager.

Thanks for pointing this out!

-tk

On Thu, May 28, 2020 at 1:23 AM Michi Kaa  wrote:

> Today I moved to user.extensions.schema_extended, but when i ran
> --rebuild-daily (or reconfigure, I really can't remember) I got an error
> that there is no "weewx.wxmanager.DaySummaryManager". I checked
> /usr/share/weewx/weewx/wxmanager.py and there is no such class. But there
> is "weewx.manager.DaySummaryManager" - so are the config examples with
>
>
> # The manager handles aggregation of data for historical summaries
> manager = weewx.wxmanager.DaySummaryManager
>
> just typos?
>
> --
> 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/fd6f4b2c-23eb-428d-a6fe-0ac97856613c%40googlegroups.com
> 
> .
>

-- 
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/CAPq0zEA8iH%3DVc0W4VgMoqc1V71EaWhPkD3609E_v9BbDPv7YEw%40mail.gmail.com.


Re: [weewx-user] Database Problem

2020-05-28 Thread Tom Keffer
Fixed in commit 6e84302
.
I also fixed the online version at weewx.com.

On Thu, May 28, 2020 at 6:31 AM Tom Keffer  wrote:

> Yes, unfortunately they are typos. They should read
>
> manager = weewx.manager.DaySummaryManager.
>
> Thanks for pointing this out!
>
> -tk
>
> On Thu, May 28, 2020 at 1:23 AM Michi Kaa 
> wrote:
>
>> Today I moved to user.extensions.schema_extended, but when i ran
>> --rebuild-daily (or reconfigure, I really can't remember) I got an error
>> that there is no "weewx.wxmanager.DaySummaryManager". I checked
>> /usr/share/weewx/weewx/wxmanager.py and there is no such class. But there
>> is "weewx.manager.DaySummaryManager" - so are the config examples with
>>
>>
>> # The manager handles aggregation of data for historical summaries
>> manager = weewx.wxmanager.DaySummaryManager
>>
>> just typos?
>>
>> --
>> 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/fd6f4b2c-23eb-428d-a6fe-0ac97856613c%40googlegroups.com
>> 
>> .
>>
>

-- 
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/CAPq0zEC5hOA_9HLw%3D7ZV27tUrmHKGmPwMRvKzgz_zeT7gzG14A%40mail.gmail.com.


Re: [weewx-user] Database Problem

2020-05-28 Thread Michi Kaa
Also a big "thank you" for all the work and the support here.

I guess I don't have to ask myself anymore, if there is a difference 
between weewx.manager.DaySummaryManager and 
weewx.wxmanager.WXDaySummaryManager

Am Donnerstag, 28. Mai 2020 15:36:55 UTC+2 schrieb Tom Keffer:
>
> Fixed in commit 6e84302 
> .
>  
> I also fixed the online version at weewx.com.
>
> On Thu, May 28, 2020 at 6:31 AM Tom Keffer > 
> wrote:
>
>> Yes, unfortunately they are typos. They should read
>>
>> manager = weewx.manager.DaySummaryManager.
>>
>> Thanks for pointing this out!
>>
>> -tk
>>
>> On Thu, May 28, 2020 at 1:23 AM Michi Kaa > > wrote:
>>
>>> Today I moved to user.extensions.schema_extended, but when i ran 
>>> --rebuild-daily (or reconfigure, I really can't remember) I got an error 
>>> that there is no "weewx.wxmanager.DaySummaryManager". I checked 
>>> /usr/share/weewx/weewx/wxmanager.py and there is no such class. But there 
>>> is "weewx.manager.DaySummaryManager" - so are the config examples with
>>>
>>>
>>> # The manager handles aggregation of data for historical summaries
>>> manager = weewx.wxmanager.DaySummaryManager
>>>
>>> just typos?
>>>
>>> -- 
>>> 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...@googlegroups.com .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/weewx-user/fd6f4b2c-23eb-428d-a6fe-0ac97856613c%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
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/4e97d260-add3-4323-b2e0-800a634cb12e%40googlegroups.com.