Here are some log details.
could this be the cause of my pain?
sqlite3.DatabaseError: database disk image is malformed
Log Details (ERROR)
Wed Jan 15 2020 11:38:35 GMT-0600 (Central Standard Time)
Error saving event: <Event state_changed[L]: entity_id=sun.sun, old_state=<state sun.sun=above_horizon; next_dawn=2020-01-16T13:06:51+00:00, next_dusk=2020-01-15T23:49:30+00:00, next_midnight=2020-01-16T06:28:56+00:00, next_noon=2020-01-15T18:28:19+00:00, next_rising=2020-01-16T13:35:59+00:00, next_setting=2020-01-15T23:20:19+00:00, elevation=28.94, azimuth=165.51, rising=True, friendly_name=Sun @ 2020-01-15T07:35:14.004473-06:00>, new_state=<state sun.sun=above_horizon; next_dawn=2020-01-16T13:06:51+00:00, next_dusk=2020-01-15T23:49:30+00:00, next_midnight=2020-01-16T06:28:56+00:00, next_noon=2020-01-15T18:28:19+00:00, next_rising=2020-01-16T13:35:59+00:00, next_setting=2020-01-15T23:20:19+00:00, elevation=29.13, azimuth=166.56, rising=True, friendly_name=Sun @ 2020-01-15T07:35:14.004473-06:00>>
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py”, line 1246, in _execute_context
cursor, statement, parameters, context
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py”, line 581, in do_execute
cursor.execute(statement, parameters)
sqlite3.DatabaseError: database disk image is malformed
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/recorder/init.py”, line 348, in run
session.flush()
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py”, line 2470, in flush
self._flush(objects)
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py”, line 2608, in _flush
transaction.rollback(_capture_exception=True)
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py”, line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py”, line 153, in reraise
raise value
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py”, line 2568, in _flush
flush_context.execute()
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/unitofwork.py”, line 422, in execute
rec.execute(self)
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/unitofwork.py”, line 589, in execute
uow,
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py”, line 245, in save_obj
insert,
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py”, line 1137, in _emit_insert_statements
statement, params
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py”, line 982, in execute
return meth(self, multiparams, params)
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/sql/elements.py”, line 287, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py”, line 1101, in _execute_clauseelement
distilled_params,
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py”, line 1250, in _execute_context
e, statement, parameters, cursor, context
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py”, line 1476, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py”, line 398, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py”, line 152, in reraise
raise value.with_traceback(tb)
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py”, line 1246, in _execute_context
cursor, statement, parameters, context
File “/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py”, line 581, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.DatabaseError: (sqlite3.DatabaseError) database disk image is malformed
[SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id) VALUES (?, ?, ?, ?, ?, ?, ?)]
[parameters: (‘state_changed’, ‘{“entity_id”: “sun.sun”, “old_state”: {“entity_id”: “sun.sun”, “state”: “above_horizon”, “attributes”: {“next_dawn”: “2020-01-16T13:06:51+00:00”, “ne … (958 characters truncated) … :00”, “last_updated”: “2020-01-15T17:38:35.005942+00:00”, “context”: {“id”: “7280998e74224f72a7bb26ff58ccf171”, “parent_id”: null, “user_id”: null}}}’, ‘LOCAL’, ‘2020-01-15 17:38:35.005998’, ‘2020-01-15 17:38:35.012778’, ‘7280998e74224f72a7bb26ff58ccf171’, None)]
(Background on this error at: http://sqlalche.me/e/4xp6)