Closed cosygarcia closed 7 months ago
Tu n'aurais pas 2 services qui tourne en même temps sur le même cache ?
j'ai pas l'impression :
root@vm03:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
79d3dede9bfc ghcr.io/alexbelgium/myelectricaldata-aarch64:0.9.3 "/usr/bin/env /ha_en…" 59 minutes ago Up 51 minutes (healthy) 0.0.0.0:5000->5000/tcp, :::5000->5000/tcp addon_db21ed7f_enedisgateway2mqtt
1844a222c6cd homeassistant/aarch64-addon-configurator:5.6.0 "/init" About an hour ago Up About an hour (healthy) addon_core_configurator
0c6a836b9f41 ghcr.io/hassio-addons/sqlite-web/aarch64:4.1.0 "/init" About an hour ago Up About an hour addon_a0d7b954_sqlite-web
227c27811020 ghcr.io/home-assistant/qemuarm-64-homeassistant:2024.1.5 "/init" About an hour ago Up About an hour homeassistant
d1e3433363b7 ghcr.io/hassio-addons/influxdb/aarch64:5.0.0 "/init" About an hour ago Up About an hour 0.0.0.0:8086->8086/tcp, :::8086->8086/tcp, 0.0.0.0:8088->8088/tcp, :::8088->8088/tcp addon_a0d7b954_influxdb
ce20631b3297 homeassistant/aarch64-addon-ssh:9.8.1 "/init" About an hour ago Up About an hour 0.0.0.0:1022->22/tcp, :::1022->22/tcp addon_core_ssh
5faef45fdfa6 homeassistant/aarch64-addon-mosquitto:6.4.0 "/init" About an hour ago Up About an hour 0.0.0.0:1883-1884->1883-1884/tcp, :::1883-1884->1883-1884/tcp, 0.0.0.0:8883-8884->8883-8884/tcp, :::8883-8884->8883-8884/tcp addon_core_mosquitto
bb8d8cc34551 ghcr.io/home-assistant/aarch64-hassio-multicast:2023.06.2 "/init" About an hour ago Up About an hour hassio_multicast
0a70e0727a65 ghcr.io/home-assistant/aarch64-hassio-audio:2023.12.0 "/init" About an hour ago Up About an hour hassio_audio
debc0c07e09f ghcr.io/home-assistant/aarch64-hassio-dns:2023.06.2 "/init" About an hour ago Up About an hour hassio_dns
b48267141de9 ghcr.io/home-assistant/aarch64-hassio-cli:2023.11.0 "/init" About an hour ago Up About an hour hassio_cli
92fb8047f479 ghcr.io/home-assistant/aarch64-hassio-supervisor:latest "/init" 6 days ago Up About an hour hassio_supervisor
9b8472354289 ghcr.io/home-assistant/aarch64-hassio-observer:2023.06.0 "/usr/bin/observer" 6 days ago Up About an hour 0.0.0.0:4357->80/tcp, :::4357->80/tcp hassio_observer
root@vm03:~# docker ps | grep myelec
79d3dede9bfc ghcr.io/alexbelgium/myelectricaldata-aarch64:0.9.3 "/usr/bin/env /ha_en…" 59 minutes ago Up 52 minutes (healthy) 0.0.0.0:5000->5000/tcp, :::5000->5000/tcp addon_db21ed7f_enedisgateway2mqtt
J'ai exactement la même erreur si j'essaie d'afficher le dashboard au démarrage de MED, quand il charge les données je pense.
impossible d'accéder à l'interface web de l'addon :
et toujours les mêmes erreurs dans les logs :
2024-02-05 17:42:19.731 - ERROR : Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 736, 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 "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 428, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 289, in __call__
await super().__call__(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
raise e
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 273, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 192, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/routers/html.py", line 22, in main
return Index(CONFIG, DB).display()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/templates/index.py", line 39, in display
select_usage_points=self.usage_point_select.html(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/templates/models/usage_point_select.py", line 20, in html
for config in self.db.get_usage_point_all():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/models/database.py", line 246, in get_usage_point_all
data = self.session.scalars(query).all()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 2, in scalars
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 1771, in scalars
return self.execute(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 1712, in execute
result = conn._execute_20(statement, params or {}, execution_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 333, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1943, in _execute_context
self._handle_dbapi_exception(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception
util.raise_(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
raise exception
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL: SELECT usage_points.usage_point_id, usage_points.name, usage_points.cache, usage_points.consumption, usage_points.consumption_detail, usage_points.production, usage_points.production_detail, usage_points.consumption_price_base, usage_points.consumption_price_hc, usage_points.consumption_price_hp, usage_points.production_price, usage_points.offpeak_hours_0, usage_points.offpeak_hours_1, usage_points.offpeak_hours_2, usage_points.offpeak_hours_3, usage_points.offpeak_hours_4, usage_points.offpeak_hours_5, usage_points.offpeak_hours_6, usage_points."plan", usage_points.refresh_addresse, usage_points.refresh_contract, usage_points.token, usage_points.progress, usage_points.progress_status, usage_points.enable, usage_points.consentement_expiration, usage_points.call_number, usage_points.quota_reached, usage_points.quota_limit, usage_points.quota_reset_at, usage_points.last_call, usage_points.ban, usage_points.consumption_max_date, usage_points.consumption_detail_max_date, usage_points.production_max_date, usage_points.production_detail_max_date, usage_points.consumption_max_power, usage_points.last_error
FROM usage_points]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
2024-02-05 17:42:46.764 - INFO : 127.0.0.1:32818 - "GET / HTTP/1.1" 500
2024-02-05 17:42:46.766 - ERROR : Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 736, 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 "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 428, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 289, in __call__
await super().__call__(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
raise e
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 273, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 192, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/routers/html.py", line 22, in main
return Index(CONFIG, DB).display()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/templates/index.py", line 39, in display
select_usage_points=self.usage_point_select.html(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/templates/models/usage_point_select.py", line 20, in html
for config in self.db.get_usage_point_all():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/models/database.py", line 246, in get_usage_point_all
data = self.session.scalars(query).all()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 2, in scalars
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 1771, in scalars
return self.execute(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 1712, in execute
result = conn._execute_20(statement, params or {}, execution_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 333, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1943, in _execute_context
self._handle_dbapi_exception(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception
util.raise_(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
raise exception
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL: SELECT usage_points.usage_point_id, usage_points.name, usage_points.cache, usage_points.consumption, usage_points.consumption_detail, usage_points.production, usage_points.production_detail, usage_points.consumption_price_base, usage_points.consumption_price_hc, usage_points.consumption_price_hp, usage_points.production_price, usage_points.offpeak_hours_0, usage_points.offpeak_hours_1, usage_points.offpeak_hours_2, usage_points.offpeak_hours_3, usage_points.offpeak_hours_4, usage_points.offpeak_hours_5, usage_points.offpeak_hours_6, usage_points."plan", usage_points.refresh_addresse, usage_points.refresh_contract, usage_points.token, usage_points.progress, usage_points.progress_status, usage_points.enable, usage_points.consentement_expiration, usage_points.call_number, usage_points.quota_reached, usage_points.quota_limit, usage_points.quota_reset_at, usage_points.last_call, usage_points.ban, usage_points.consumption_max_date, usage_points.consumption_detail_max_date, usage_points.production_max_date, usage_points.production_detail_max_date, usage_points.consumption_max_power, usage_points.last_error
FROM usage_points]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
2024-02-05 17:42:54.551 - INFO : 127.0.0.1:35432 - "GET / HTTP/1.1" 500
2024-02-05 17:42:54.553 - ERROR : Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 736, 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 "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 428, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 289, in __call__
await super().__call__(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
raise e
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 273, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 192, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/routers/html.py", line 22, in main
return Index(CONFIG, DB).display()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/templates/index.py", line 39, in display
select_usage_points=self.usage_point_select.html(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/templates/models/usage_point_select.py", line 20, in html
for config in self.db.get_usage_point_all():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/models/database.py", line 246, in get_usage_point_all
data = self.session.scalars(query).all()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 2, in scalars
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 1771, in scalars
return self.execute(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 1712, in execute
result = conn._execute_20(statement, params or {}, execution_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 333, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1943, in _execute_context
self._handle_dbapi_exception(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception
util.raise_(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
raise exception
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL: SELECT usage_points.usage_point_id, usage_points.name, usage_points.cache, usage_points.consumption, usage_points.consumption_detail, usage_points.production, usage_points.production_detail, usage_points.consumption_price_base, usage_points.consumption_price_hc, usage_points.consumption_price_hp, usage_points.production_price, usage_points.offpeak_hours_0, usage_points.offpeak_hours_1, usage_points.offpeak_hours_2, usage_points.offpeak_hours_3, usage_points.offpeak_hours_4, usage_points.offpeak_hours_5, usage_points.offpeak_hours_6, usage_points."plan", usage_points.refresh_addresse, usage_points.refresh_contract, usage_points.token, usage_points.progress, usage_points.progress_status, usage_points.enable, usage_points.consentement_expiration, usage_points.call_number, usage_points.quota_reached, usage_points.quota_limit, usage_points.quota_reset_at, usage_points.last_call, usage_points.ban, usage_points.consumption_max_date, usage_points.consumption_detail_max_date, usage_points.production_max_date, usage_points.production_detail_max_date, usage_points.consumption_max_power, usage_points.last_error
FROM usage_points]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
2024-02-05 17:43:02.813 - INFO : 127.0.0.1:35442 - "GET / HTTP/1.1" 500
2024-02-05 17:43:02.817 - ERROR : Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 736, 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 "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 428, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 289, in __call__
await super().__call__(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
raise e
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 273, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 192, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/routers/html.py", line 22, in main
return Index(CONFIG, DB).display()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/templates/index.py", line 39, in display
select_usage_points=self.usage_point_select.html(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/templates/models/usage_point_select.py", line 20, in html
for config in self.db.get_usage_point_all():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/models/database.py", line 246, in get_usage_point_all
data = self.session.scalars(query).all()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 2, in scalars
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 1771, in scalars
return self.execute(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 1712, in execute
result = conn._execute_20(statement, params or {}, execution_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 333, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1943, in _execute_context
self._handle_dbapi_exception(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception
util.raise_(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
raise exception
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL: SELECT usage_points.usage_point_id, usage_points.name, usage_points.cache, usage_points.consumption, usage_points.consumption_detail, usage_points.production, usage_points.production_detail, usage_points.consumption_price_base, usage_points.consumption_price_hc, usage_points.consumption_price_hp, usage_points.production_price, usage_points.offpeak_hours_0, usage_points.offpeak_hours_1, usage_points.offpeak_hours_2, usage_points.offpeak_hours_3, usage_points.offpeak_hours_4, usage_points.offpeak_hours_5, usage_points.offpeak_hours_6, usage_points."plan", usage_points.refresh_addresse, usage_points.refresh_contract, usage_points.token, usage_points.progress, usage_points.progress_status, usage_points.enable, usage_points.consentement_expiration, usage_points.call_number, usage_points.quota_reached, usage_points.quota_limit, usage_points.quota_reset_at, usage_points.last_call, usage_points.ban, usage_points.consumption_max_date, usage_points.consumption_detail_max_date, usage_points.production_max_date, usage_points.production_detail_max_date, usage_points.consumption_max_power, usage_points.last_error
FROM usage_points]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Hello, On dirais que la bdd sqlite est corrompu :/ Le plus simple et de supprimer le fichier cache.db et de repartir avec un fichier clean.
Hello, même chose suite à la mise à jour en 0.10.0 ce matin. En revenant à la 0.9.3 le problème disparait. Le fichier .lock n'est pas effacé lors de l'arret du container. En le supprimant, la v0.10.0 démarre.
j'ai fait plusieurs tests : 1) Arrêter le conteneur myelectricaldata ; supprimer le fichier cache.db ; redémarrer le conteneur myelectricaldata : toujours les mêmes erreurs database is locked
2) désinstaller l'addon myelectricaldata v0.9.3 ; installer l'addon myelectricaldata v0.9.3 ; supprimer le fichier cache.db ; démarrer le conteneur myelectricaldata : toujours les mêmes erreurs database is locked
Hello, même chose suite à la mise à jour en 0.10.0 ce matin. En revenant à la 0.9.3 le problème disparait. Le fichier .lock n'est pas effacé lors de l'arret du container. En le supprimant, la v0.10.0 démarre.
de quel fichier .lock s'agit-il ?
la log complète en PJ addon_db21ed7f_enedisgateway2mqtt.log
en 0.9.3 la navigation sur la page de resultat myelectricaldata http://
en 0.9.3 la navigation sur la page de resultat myelectricaldata http://
/usage_point_id/ plante en Internal server error lors de la recuperation des données et fonctionne en dehors de cette plage. en 0.10.0, j'ai systematiquement internal server error sur la page usage_point_id et souvent sur l'url racine.
Il me semble que dans les deux cas je récupère bien les donnée dans home assistant. (je dois attendre demain pour la 0.10.0).
Même constat. MED tourne sur docker.
Ca me casse les ... car je n'arrive pas à reproduire le bug :/
@gandulf78, si tu tourne sous docker "classic" et pas HaOS, tu pourrais m'envoyer tt ta conf de deployement & co afin que j'arrive à reproduire chez moi le soucis ?
=> m4dm4rtig4n@gmail.com
Hello, en 0.10.0, les données sont bien envoyées à home assistant mais impossible de me connecter sur la page /usage_point_id, la page affiche "internal server error" Je tourne en docker sur synology.
@wallb35 oui c'est normal j'ai un soucis fix dans la 0.11.0-RC.2.
Toujours les mêmes erreurs en v0.10
Vous avez encore le soucis ?
Bonjour, plus de problème depuis la 0.11.0 ! Merci !
Je clos donc, merci pour ton retour @wallb35 :)
Il semble que quelque soit la version le problème se pose dès que je mets :
consumption_detail_max_date: '2023-01-01' consumption_max_date: '2023-01-01'
dans le config.yaml
Bonjour,
voici le problème rencontré :
Description du bug J'ai mis à jour l'addon de la version 0.9.1 à la 0.9.3.
Configuration (config.yaml)
``` cycle: 3600 debug: false home_assistant: discovery_prefix: homeassistant enable: true discovery: true card_myenedis: true influxdb: #bucket: "DATABASE/RETENTION" bucket: "homeassistant/autogen" enable: true hostname: addon_a0d7b954_influxdb method: synchronous org: "-" port: 8086 #token: USERNAME:PASSWORD token: homeassistant:******** log2file: false mqtt: client_id: myelectricaldata enable: true hostname: core-mosquitto password: '**********' port: 1883 prefix: myelectricaldata qos: 0 retain: true username: 'mqttuser' myelectricaldata: "XXXXXXXXXXXXXXX": activation_date_daily: '' activation_date_detail: '' cache: false consumption: true consumption_detail: true consumption_detail_max_date: '2023-09-01' consumption_max_date: '2023-09-01' consumption_price_base: '0.2276' consumption_price_hc: '0.1828' consumption_price_hp: '0.2460' enable: true name: 'Maison' #offpeak_hours: '22H56-6H56' offpeak_hours_0: '22H56-6H56' offpeak_hours_1: '22H56-6H56' offpeak_hours_2: '22H56-6H56' offpeak_hours_3: '22H56-6H56' offpeak_hours_4: '22H56-6H56' offpeak_hours_5: '22H56-6H56' offpeak_hours_6: '22H56-6H56' plan: HC/HP #production: false #production_detail: false #production_detail_max_date: '' #production_max_date: '' #production_price: 0 refresh_addresse: false refresh_contract: false #token: "xxxxxxxxxx" token: "xxxxxxxxxxxx" tempo: enable: false price_blue_hc: 0.097 price_blue_hp: 0.1249 price_red_hc: 0.1216 price_red_hp: 0.6712 price_white_hc: 0.114 price_white_hp: 0.1508 ```Type d'installation
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 1009 Installed Version | 1.34.0 Stage | running Available Repositories | 1384 Downloaded Repositories | 10Home Assistant Cloud
logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okHome Assistant Supervisor
host_os | Debian GNU/Linux 11 (bullseye) -- | -- update_channel | stable supervisor_version | supervisor-2023.12.1 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 59.9 GB disk_used | 45.0 GB healthy | true supported | true supervisor_api | ok version_api | ok installed_addons | SQLite Web (4.1.0), Terminal & SSH (9.8.1), InfluxDB (5.0.0), Mosquitto broker (6.4.0), File editor (5.6.0), MyElectricalData (0.9.3)Dashboards
dashboards | 1 -- | -- resources | 5 views | 5 mode | storageRecorder
oldest_recorder_run | 21 janvier 2024 à 18:22 -- | -- current_recorder_run | 31 janvier 2024 à 16:15 estimated_db_size | 2365.34 MiB database_engine | sqlite database_version | 3.41.2Logs :