v4 shipped with the wview_extended schema as the default, which has 114 
fields.   You need to convert your old db to the extended schema, then redo 
your dump and import commands (which look good).

See 
if 
https://github.com/weewx/weewx/wiki/Switching-to-the-new-wview_extended-schema 
helps any.

The important step is the "wee_database weewx.conf --reconfigure" command 
in the wiki page.  You can likely just run that command versus a 'copy' of 
your v3 database if you run it on your v4 system which already has a 
weewx.conf file set to the newer/bigger schema.

Always work off a copy of your databases just in case.  The procedure can 
take a while on a slow system like a pi if you have many years of data, as 
can the --rebuild-daily you need to do at the end after you merge the two 
archive tables.

On Sunday, April 24, 2022 at 8:09:19 AM UTC-7 Meteo Oberwallis wrote:

> Hello, everyone.
> I wanted to merge my old weewx.sbd (Version 3.9.2) with the new version of 
> weewx 4.8.0. I did this via:
> Dump the db1.sdb database to a file:
>
> $sqlite3 /path/to/db1.sdb
> sqlite> .output /var/tmp/db1.dump
> sqlite> .dump
> sqlite> .quit
>
> Now import the dumped data into the final database weewx.sdb:
>
> $ sqlite3 /home/weewx/archive/weewx.sdb
> sqlite> .read /var/tmp/db1.dump
> sqlite> .quit
>
> now I get the following error:
>
> Error: near line 333827: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333828: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333829: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333830: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333831: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333832: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333833: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333834: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333835: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333836: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333837: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333838: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333839: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333840: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333841: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333842: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333843: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333844: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333845: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333846: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333847: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333848: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333849: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333850: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333851: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333852: table archive has 114 columns but 53 values 
> ​​were supplied
>
> Why could that be. The database was previously with
> [data bindings]
>     
>     [[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 = schemas.wview.schema
>         schema = user.radiationhours.schema_with_sunshine_hours
>
> thank you for your help

-- 
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/87e44d79-ab1b-4dd9-a79c-16165823bb4an%40googlegroups.com.

Reply via email to