Cameron,

this doesn't work. I copied my database to the new machine, made a new 
weewx database and replayed it. 
If I use the wview_extended.py from the 2.5.-3.9 weewx install, it seems to 
work.

If I add the new additional lines form the 4.0.0. at the end of the 
wview_extended.py file...

day_summaries = [(e[0], 'scalar') for e in table
                 if e[0] not in ('dateTime', 'usUnits', 'interval')] + [(
'wind', 'VECTOR')]

schema = {
    'table': table,
    'day_summaries' : day_summaries
}



I got this error:


Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__: Caught unrecoverable 
exception:
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****  name 
'table' is not defined
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****  Traceback 
(most recent call last):
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****    File 
"/usr/share/weewx/weewxd", line 148, in main
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****      engine 
= weewx.engine.StdEngine(config_dict)
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 75, in __init__
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****      
self.loadServices(config_dict)
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 138, in loadServices
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****      obj = 
weeutil.weeutil.get_object(svc)(self,config_dict)
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****    File 
"/usr/share/weewx/weewx/wxservices.py", line 81, in __init__
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****      
engine.db_binder)
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****    File 
"/usr/share/weewx/weewx/wxservices.py", line 124, in __init__
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****      
initialize=True)
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****    File 
"/usr/share/weewx/weewx/manager.py", line 529, in get_manager
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****      
default_binding_dict=defaults)
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****    File 
"/usr/share/weewx/weewx/manager.py", line 660, in 
get_manager_dict_from_config
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****      
manager_dict['schema'] = weeutil.weeutil.get_object(schema_name)
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****    File 
"/usr/share/weewx/weeutil/weeutil.py", line 1093, in get_object
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****      mod = 
__import__(module)
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****    File 
"/usr/share/weewx/schemas/wview_extended.py", line 84, in <module>
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****      
day_summaries = [(e[0], 'scalar') for e in table
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****  NameError: 
name 'table' is not defined
Jun 20 10:30:55 weewx weewx[24866] CRITICAL __main__:     ****  Exiting.


The question is: should I just run 4.x with the old database and old 
scheme!? But then the new added fields are missing like 

'
cloudbase',            'REAL'),
     ('co',                   'REAL'),
    ('co2',                  'REAL'),


...which could be interesting in the future. 

So how to move the old database to a new one with old data and the new 
fields and new syntax?

Regards,

Christian 

Am Mittwoch, 17. Juni 2020 14:05:42 UTC+2 schrieb Cameron D:
>
> You do not need to change your database at all - but obviously back it up 
> first.
> I found all I had to do was add the bottom few lines (day_summaries) to my 
> custom schema file.
>

-- 
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/2fe98e21-c916-41e2-8f2f-b78ce5ca698ao%40googlegroups.com.

Reply via email to