ynab icon indicating copy to clipboard operation
ynab copied to clipboard

Error message when adding the custom component

Open diazepam69 opened this issue 1 month ago • 0 comments

Hi folks

I'm having the same issue described in the previous issue (https://github.com/wxt9861/ynab/issues/34), where I add all the configs (through HACS), I can see the integration on the Integrations page, but nothing inside it.

When I check the debug log, I found the following error:

2025-01-12 21:49:03.808 ERROR (MainThread) [homeassistant.components.sensor] ynab: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 737, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1318, in async_device_update
    await self.async_update()
  File "/config/custom_components/ynab/sensor.py", line 32, in async_update
    await self.hass.data[DOMAIN_DATA]["client"].update_data()
  File "/config/custom_components/ynab/__init__.py", line 124, in update_data
    self.all_budgets = await self.hass.async_add_executor_job(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        self.ynab.budgets.get_budgets
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.13/site-packages/ynab_sdk/api/budgets.py", line 13, in get_budgets
    return BudgetSummaryResponse.from_dict(response)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/ynab_sdk/api/models/responses/budget_summary.py", line 102, in from_dict
    data = Data.from_dict(obj.get("data"))
  File "/usr/local/lib/python3.13/site-packages/ynab_sdk/api/models/responses/budget_summary.py", line 90, in from_dict
    assert isinstance(obj, dict)
           ~~~~~~~~~~^^^^^^^^^^^
AssertionError

I even did the proposed solution on the issue 34, but still no luck.

My Home Assistant version is the latest one (2025.1.2).

Any help will be appreciated. Thanks!

diazepam69 avatar Jan 12 '25 20:01 diazepam69