『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 3094|回复: 2

求助贴:日志中出现无数出错信息。请大神帮我看一下

[复制链接]

12

主题

193

帖子

1138

积分

论坛积极会员

积分
1138
金钱
945
HASS币
0
发表于 2019-12-23 19:19:49 | 显示全部楼层 |阅读模式
Error saving event: <Event state_changed[L]: entity_id=switch.plug_158d00036399de, old_state=<state switch.plug_158d00036399de=on; in_use=1, load_power=74.37, power_consumed=22182.0, voltage=3.6, battery_level=100.0, friendly_name=电脑电源, icon=mdi:power-socket @ 2019-12-23T19:05:34.826787+08:00>, new_state=<state switch.plug_158d00036399de=on; in_use=1, load_power=73.51, power_consumed=22182.0, voltage=3.6, battery_level=100.0, friendly_name=电脑电源, icon=mdi:power-socket @ 2019-12-23T19:05:34.826787+08: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": "switch.plug_158d00036399de", "old_state": {"entity_id": "switch.plug_158d00036399de", "state": "on", "attributes": {"in_use": 1, "load ... (669 characters truncated) ... :00", "last_updated": "2019-12-23T11:17:42.782142+00:00", "context": {"id": "53f5a6c6493f4ec8b1493d1a203c3391", "parent_id": null, "user_id": null}}}', 'LOCAL', '2019-12-23 11:17:42.782344', '2019-12-23 11:17:42.798202', '53f5a6c6493f4ec8b1493d1a203c3391', None)]
(Background on this error at: http://sqlalche.me/e/4xp6)
请问。这是什么错误,升级到0.103后就这样了。
回复

使用道具 举报

1

主题

67

帖子

523

积分

高级会员

Rank: 4

积分
523
金钱
456
HASS币
0
发表于 2019-12-23 22:05:08 | 显示全部楼层
数据库文件损坏
检查你的数据库!
回复

使用道具 举报

12

主题

193

帖子

1138

积分

论坛积极会员

积分
1138
金钱
945
HASS币
0
 楼主| 发表于 2019-12-24 09:03:10 来自手机 | 显示全部楼层
小白一个,请指教一下
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-25 17:17 , Processed in 0.438260 second(s), 25 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表