I have been getting this for the last few days. I have tried restarting HA and rebooting the Pi. Any thoughts?
17-01-05 03:23:21 aiohttp.server: Error handling request
Traceback (most recent call last):
File "/home/hass/.homeassistant/deps/sqlalchemy/engine/base.py", line 1182, in _execute_context
context)
File "/home/hass/.homeassistant/deps/sqlalchemy/engine/default.py", line 469, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/hass/.homeassistant/deps/aiohttp/web_server.py", line 61, in handle_request
resp = yield from self._handler(request)
File "/home/hass/.homeassistant/deps/aiohttp/web.py", line 249, in _handle
resp = yield from handler(request)
File "/usr/lib/python3.4/asyncio/coroutines.py", line 143, in coro
res = yield from res
File "/usr/lib/python3.4/asyncio/coroutines.py", line 143, in coro
res = yield from res
File "/srv/hass/lib/python3.4/site-packages/homeassistant/components/http/__init__.py", line 427, in handle
result = yield from result
File "/srv/hass/lib/python3.4/site-packages/homeassistant/components/history.py", line 240, in get
self.filters)
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/components/history.py", line 87, in get_significant_states
return states_to_json(states, start_time, entity_id, filters)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/components/history.py", line 157, in states_to_json
for state in get_states(start_time, entity_ids, filters=filters):
File "/srv/hass/lib/python3.4/site-packages/homeassistant/components/history.py", line 112, in get_states
run = recorder.run_information(utc_point_in_time)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/components/recorder/__init__.py", line 95, in run_information
(recorder_runs.end > point_in_time)).first()
File "/home/hass/.homeassistant/deps/sqlalchemy/orm/query.py", line 2697, in first
ret = list(self[0:1])
File "/home/hass/.homeassistant/deps/sqlalchemy/orm/query.py", line 2489, in __getitem__
return list(res)
File "/home/hass/.homeassistant/deps/sqlalchemy/orm/query.py", line 2797, in __iter__
return self._execute_and_instances(context)
File "/home/hass/.homeassistant/deps/sqlalchemy/orm/query.py", line 2820, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/home/hass/.homeassistant/deps/sqlalchemy/engine/base.py", line 945, in execute
return meth(self, multiparams, params)
File "/home/hass/.homeassistant/deps/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/home/hass/.homeassistant/deps/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement
compiled_sql, distilled_params
File "/home/hass/.homeassistant/deps/sqlalchemy/engine/base.py", line 1189, in _execute_context
context)
File "/home/hass/.homeassistant/deps/sqlalchemy/engine/base.py", line 1393, in _handle_dbapi_exception
exc_info
File "/home/hass/.homeassistant/deps/sqlalchemy/util/compat.py", line 202, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/home/hass/.homeassistant/deps/sqlalchemy/util/compat.py", line 185, in reraise
raise value.with_traceback(tb)
File "/home/hass/.homeassistant/deps/sqlalchemy/engine/base.py", line 1182, in _execute_context
context)
File "/home/hass/.homeassistant/deps/sqlalchemy/engine/default.py", line 469, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked [SQL: 'SELECT recorder_runs.run_id AS recorder_runs_run_id, recorder_runs.start AS recorder_runs_start, recorder_runs."end" AS recorder_runs_end, recorder_runs.closed_incorrect AS recorder_runs_closed_incorrect, recorder_runs.created AS recorder_runs_created \nFROM recorder_runs \nWHERE recorder_runs.start < ? AND recorder_runs."end" > ?\n LIMIT ? OFFSET ?'] [parameters: ('2017-01-04 09:23:14.942502', '2017-01-04 09:23:14.942502', 1, 0)]