You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2024-09-06 00:58:50.955 ERROR (MainThread) [custom_components.pesc.pesc_client] ClientError[url=https://ikus.pesc.ru/api/v8/accounts/1872197/address, code=355, message=Для текущего провайдера операция не поддерживается, cause=]
2024-09-06 01:00:11.510 ERROR (MainThread) [custom_components.pesc] Unexpected error fetching pesc data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
self.data = await self.async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pesc/init.py", line 77, in async_update_data
await self.relogin_and_fetch(False)
File "/config/custom_components/pesc/init.py", line 84, in relogin_and_fetch
await self.api.async_fetch_all()
File "/config/custom_components/pesc/pesc_api.py", line 233, in async_fetch_all
await self.async_fetch_data()
File "/config/custom_components/pesc/pesc_api.py", line 255, in async_fetch_data
await asyncio.gather(*(self._load_account(account) for account in accounts))
File "/config/custom_components/pesc/pesc_api.py", line 260, in _load_account
await asyncio.gather(
File "/config/custom_components/pesc/pesc_api.py", line 282, in _load_meters
ind = MeterInd(acc, met, met_ind)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pesc/pesc_api.py", line 60, in init
self.date = datetime.strptime(ind["previousReadingDate"], "%d.%m.%Y").date()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: strptime() argument 1 must be str, not None
The text was updated successfully, but these errors were encountered:
None вместо string при инициализации
self.date = datetime.strptime(ind["previousReadingDate"], "%d.%m.%Y").date()
Залечил
self.date = datetime.strptime("01.01.2020", "%d.%m.%Y").date()
В одном из лицевых счетов (конкретно Газпроммежрегионгаз) не указан адрес. Из-за чего скрипт вылетает с ошибкой. Хотя можно ее и обработать.
Удалил этот лицевой счет из ЛК ПЭС.
Лог:
2024-09-06 00:58:50.955 ERROR (MainThread) [custom_components.pesc.pesc_client] ClientError[url=https://ikus.pesc.ru/api/v8/accounts/1872197/address, code=355, message=Для текущего провайдера операция не поддерживается, cause=]
2024-09-06 01:00:11.510 ERROR (MainThread) [custom_components.pesc] Unexpected error fetching pesc data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
self.data = await self.async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pesc/init.py", line 77, in async_update_data
await self.relogin_and_fetch(False)
File "/config/custom_components/pesc/init.py", line 84, in relogin_and_fetch
await self.api.async_fetch_all()
File "/config/custom_components/pesc/pesc_api.py", line 233, in async_fetch_all
await self.async_fetch_data()
File "/config/custom_components/pesc/pesc_api.py", line 255, in async_fetch_data
await asyncio.gather(*(self._load_account(account) for account in accounts))
File "/config/custom_components/pesc/pesc_api.py", line 260, in _load_account
await asyncio.gather(
File "/config/custom_components/pesc/pesc_api.py", line 282, in _load_meters
ind = MeterInd(acc, met, met_ind)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pesc/pesc_api.py", line 60, in init
self.date = datetime.strptime(ind["previousReadingDate"], "%d.%m.%Y").date()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: strptime() argument 1 must be str, not None
The text was updated successfully, but these errors were encountered: