The error says the disk image is malformed. Can you open the database file with another tool, such as DB Browser or SQLite itself?
If it's true and the database is messed up, then you may need to get a back up if you have one. On Tue, Jul 4, 2023 at 2:04 PM Yves Martin <[email protected]> wrote: > Hi, > > I've upgraded the Debian distribution (from version 7 to 10) and Python > 2.7 to 3.8. > > I've copied the sqlite database in /var/lib/weewx/ to the new distribution. > > Unfortunately, when I start weewx, I have this error : > > Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__: > **** File "/usr/share/weewx/weewx/manager.py", line 130, in __init__ > Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__: > **** self.sqlkeys = self.connection.columnsOf(self.table_name) > Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__: > **** File "/usr/share/weewx/weedb/sqlite.py", line 187, in columnsOf > Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__: > **** column_list = [row[1] for row in self.genSchemaOf(table)] > Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__: > **** File "/usr/share/weewx/weedb/sqlite.py", line 187, in <listcomp> > Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__: > **** column_list = [row[1] for row in self.genSchemaOf(table)] > Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__: > **** File "/usr/share/weewx/weedb/sqlite.py", line 176, in genSchemaOf > Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__: > **** for row in self.connection.execute("""PRAGMA table_info(%s);""" > % table): > Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__: > **** sqlite3.DatabaseError: database disk image is malformed > Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__: > **** Exiting. > > I cannot find here this kind of error. > Any help or suggestion will be appreciated. > > Regards, > Yves > YMartin.com/meteo > > -- > 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/61339c2c-7deb-4c69-88c8-f2e3a0edcfd2n%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/61339c2c-7deb-4c69-88c8-f2e3a0edcfd2n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Peter Quinn (415)794-2264 -- 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/CAA1SM22JMs5iHZF%2BhEXwBhvreiKXW-kN9-TadDWg%3DbuwD4_dHA%40mail.gmail.com.
