Updating database from weewx 3.9 to weewx 4.1

175 views
Skip to first unread message

Harry Nieuwdorp

unread,
Jul 4, 2020, 8:56:45 AM7/4/20
to weewx-user
Dear group,

I have the following problem to update my sqlite database from 3.9 into 4.1

I get the following info:
pi@HNRpb4:/var/lib/weewx $ wee_import --import-config=/home/pi/Weewx/Lib/weewx3.9.sdb --dry-run
Using WeeWX configuration file /etc/weewx/weewx.conf
Starting wee_import...
**** 'utf-8' codec can't decode byte 0xec in position 106: invalid continuation byte
**** Nothing done, exiting.

what can i do to repair pos. 106

how can i open weewx3.9.sdb database

Thanks in advance for help.

Regards Harry de PE1IAA

Tom Keffer

unread,
Jul 4, 2020, 9:46:52 AM7/4/20
to weewx-user
The utility wee_import takes a configuration file for argument --import-config. You are using a database.

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/b588cf65-b8bc-4fa9-8f9c-0b1195c2fb56o%40googlegroups.com.

Harry Nieuwdorp

unread,
Jul 4, 2020, 4:20:40 PM7/4/20
to weewx-user
Hello Tom,

Thanks for info. will look for uitil/import_config file.

Regards Harry de PE1IAA

Op zaterdag 4 juli 2020 14:56:45 UTC+2 schreef Harry Nieuwdorp:

Harry Nieuwdorp

unread,
Jul 6, 2020, 4:17:09 PM7/6/20
to weewx-user
Hello Tom,

I need some help, as i cannot get old data in new weewx.sdb file

I have tried the following:
pi@HNRpb4:~/weewx/var/lib $ sudo wee_database --transfer weewx3.9.sdb weewx.sdb --dry-run
Traceback (most recent call last):
  File "/usr/share/weewx/wee_database", line 974, in <module>
    main()
  File "/usr/share/weewx/wee_database", line 128, in main
    config_path, config_dict = weecfg.read_config(options.config_path, args)
  File "/usr/share/weewx/weecfg/__init__.py", line 179, in read_config
    default_encoding='utf-8')
  File "/usr/lib/python3/dist-packages/configobj.py", line 1229, in __init__
    self._load(infile, configspec)
  File "/usr/lib/python3/dist-packages/configobj.py", line 1287, in _load
    content = self._handle_bom(content)
  File "/usr/lib/python3/dist-packages/configobj.py", line 1437, in _handle_bom
    return self._decode(infile, self.encoding)
  File "/usr/lib/python3/dist-packages/configobj.py", line 1517, in _decode
    infile[i] = line.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xec in position 106: invalid continuation byte
pi@HNRpb4:~/weewx/var/lib $ 

this does not work.

I also cannot copy weewx3.9.sdb in /var/lib/ dir also not as a sudo su. how do i do this.

Import files do not help either, by the way these are in user/share/weewx/import. not in util as doc descripes.

Help is apreciated. i am a beginner with linux.

Regards Harry de PE1IAA

Op zaterdag 4 juli 2020 14:56:45 UTC+2 schreef Harry Nieuwdorp:
Dear group,

Tom Keffer

unread,
Jul 6, 2020, 7:07:44 PM7/6/20
to weewx-user
What are you trying to accomplish?

--
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+...@googlegroups.com.

Harry Nieuwdorp

unread,
Jul 7, 2020, 8:40:17 AM7/7/20
to weewx-user
Hello Tom, i try to get data from weewx3.9.sdb into weewx.sdb from weewx 4.1

i have downloaded studiolite 3.2.1

Have exported weewx3.9 to csv file and try to import into weews.sdb from 4.1
now i get the following info:
[14:10:20] Export to the file 'D:/Users/Nieuwdorp/Documents/Weer/Weewx/weewx3.9.csv' was successful.
[14:12:56] Table 'archive' has more columns than there are columns in the data to be imported. Some columns in the table will be left empty.
[14:12:56] Error while importing data: table archive has 114 columns but 52 values were supplied.

How do i solve this problem. why is there no info that files are different in weewx 4.1.1.

Help and info is appreciated.

Regards Harry de PE1IAA

Op zaterdag 4 juli 2020 14:56:45 UTC+2 schreef Harry Nieuwdorp:
Dear group,

Tom Keffer

unread,
Jul 7, 2020, 9:53:44 AM7/7/20
to weewx-user
There is no info because the files are not different. There has been absolutely no change in databases. Just copy the file over.

The only change is that the default schema for new databases has changed. But, that does not affect existing databases.

Where did you get the impression that the database had changed?

-tk

--
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+...@googlegroups.com.

Harry Nieuwdorp

unread,
Jul 7, 2020, 4:11:15 PM7/7/20
to weewx-user
Hello Tom,

I think due to the following message:
[14:12:56] Error while importing data: table archive has 114 columns but 52 values were supplied.

In file weewx3.9 i have no extratemp4 etc.and 52 colums.
Can i send file direct ??

Can you help me how i can copy to the  /var/lib/ directory. It is not possible for me tp copy a file to this directory.
I have tried in Raspbian with filemanager and with winscp from windows to Rpb4. No success.

I appreciate your help and info. I am new with Raspbian linux software. Try to read very much in the manual, but sometimes difficult to understand.

Regards Harry de PE1IAA


Op zaterdag 4 juli 2020 14:56:45 UTC+2 schreef Harry Nieuwdorp:
Dear group,

Harry Nieuwdorp

unread,
Jul 13, 2020, 4:45:29 AM7/13/20
to weewx-user
Hello Tom,

Did you miss my latetst reply, or did i something wrong.

Regards Harry de PE1IAA

Op dinsdag 7 juli 2020 om 22:11:15 UTC+2 schreef Harry Nieuwdorp:

Tom Keffer

unread,
Jul 13, 2020, 8:29:06 AM7/13/20
to weewx-user
In order to help, we need to know what problem you are trying to solve. Why not simply copy the database to your v4.1 installation?

-tk

--
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+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages