Ajuda Erro LOG - Não sei como corrigir

Boa tarde,

Ajuda em erros, não sei como resolver.

Capturar

Logger: homeassistant.components.recorder
Source: components/recorder/__init__.py:516
Integration: Recorder (documentation, issues)
First occurred: 17:32:00 (1 occurrences)
Last logged: 17:32:00

Error saving events: (sqlite3.DatabaseError) database disk image is malformed [SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id, context_parent_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?)] [parameters: ('call_service', '{"domain": "system_log", "service": "clear", "service_data": {}}', 'LOCAL', '2020-12-05 17:31:59.034429', '2020-12-05 17:31:59.034429', '9a846c81218bea6f524c736c2048f511', '520bf80cd1d74d1ea35814792996ec5b', None)] (Background on this error at: http://sqlalche.me/e/13/4xp6)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 593, 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 454, in _commit_event_session_or_retry
    self._commit_event_session()
  File "/usr/src/homeassistant/homeassistant/components/recorder/__init__.py", line 516, in _commit_event_session
    self.event_session.commit()
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1042, in commit
    self.transaction.commit()
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 504, in commit
    self._prepare_impl()
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 483, in _prepare_impl
    self.session.flush()
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2536, in flush
    self._flush(objects)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2678, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
    compat.raise_(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2638, in _flush
    flush_context.execute()
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
    rec.execute(self)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 586, in execute
    persistence.save_obj(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py", line 239, in save_obj
    _emit_insert_statements(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py", line 1135, in _emit_insert_statements
    result = cached_connections[connection].execute(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
    ret = self._execute_context(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
    self._handle_dbapi_exception(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
    util.raise_(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 593, 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, context_parent_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?)]
[parameters: ('call_service', '{"domain": "system_log", "service": "clear", "service_data": {}}', 'LOCAL', '2020-12-05 17:31:59.034429', '2020-12-05 17:31:59.034429', '9a846c81218bea6f524c736c2048f511', '520bf80cd1d74d1ea35814792996ec5b', None)]
(Background on this error at: http://sqlalche.me/e/13/4xp6)
Logger: homeassistant.components.recorder
Source: components/recorder/__init__.py:518
Integration: Recorder (documentation, issues)
First occurred: 17:41:12 (1 occurrences)
Last logged: 17:41:12

Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id, context_parent_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?)] [parameters: ('call_service', '{"domain": "system_log", "service": "clear", "service_data": {}}', 'LOCAL', '2020-12-05 17:41:11.019374', '2020-12-05 17:41:11.019374', '8da2a4bce1253cafc9e1476256b64aaa', '520bf80cd1d74d1ea35814792996ec5b', None)] (Background on this error at: http://sqlalche.me/e/13/4xp6)

apaga a base de dados e o erro desaprece.

perde-se o histórico com ao apagar a bd

1 Like

Como faço isso ?

Obrigado

Tem o samba instalado com add-on?

se sim e entrar no HA via samba, aceder à diretoria config e apagar o ficheiro.

Acedendo à pasta /config do HA, apagas o ficheiro home-assistant_v2.db

1 Like

Alguém sabe qual é a razão deste erro:

Logger: libav.rtsp
Source: components/stream/worker.py:240
First occurred: 9:00:38 (40 occurrences)
Last logged: 9:34:40

Too short data for FU-A H.264 RTP packet

Copyright © 2017-2020. Todos os direitos reservados
CPHA.pt - info@cpha.pt


FAQ | Termos de Serviço/Regras | Política de Privacidade