Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detected Blocking Call #61

Open
3 tasks done
latetedemelon opened this issue Jun 27, 2024 · 0 comments
Open
3 tasks done

Detected Blocking Call #61

latetedemelon opened this issue Jun 27, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@latetedemelon
Copy link

Before you submit a new bug report, please check that

Describe the bug

Errors found in log file

Configuration

Home Assistant

Core
2024.6.4
Supervisor
2024.06.2
Operating System
12.4
Frontend
20240610.1

Debug logs

2024-06-27 13:08:04.013 DEBUG (MainThread) [custom_components.holidays] Setting Complete from ConfigFlow
2024-06-27 13:08:17.195 DEBUG (MainThread) [custom_components.holidays.calendar] (Complete) Calling update
2024-06-27 13:08:17.195 DEBUG (MainThread) [custom_components.holidays.calendar] (Complete) Country Holidays with parameters: country: CA, subdivision: BC, observed: True
2024-06-27 13:08:17.204 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'holidays' at custom_components/holidays/__init__.py, line 133: return holidays.country_holidays(country, **kwargs) (offender: /usr/local/lib/python3.12/gettext.py, line 537: with open(mofile, 'rb') as fp:), please create a bug report at https://github.com/bruxy70/Holidays/issues
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 680, in _async_handle_interval_callback
    self.config_entry.async_create_background_task(
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1164, in async_create_background_task
    task = hass.async_create_background_task(target, name, eager_start)
  File "/usr/src/homeassistant/homeassistant/core.py", line 860, in async_create_background_task
    task = create_eager_task(target, name=name, loop=self.loop)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 37, in create_eager_task
    return Task(coro, loop=loop, name=name, eager_start=True)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 1050, in _async_update_entity_states
    await entity.async_update_ha_state(True)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 941, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1289, in async_device_update
    await self.async_update()
  File "/config/custom_components/holidays/calendar.py", line 276, in async_update
    await self._async_load_holidays()
  File "/config/custom_components/holidays/calendar.py", line 103, in _async_load_holidays
    hol = create_holidays(
  File "/config/custom_components/holidays/__init__.py", line 133, in create_holidays
    return holidays.country_holidays(country, **kwargs)

2024-06-27 13:08:17.208 DEBUG (MainThread) [custom_components.holidays.calendar] (Complete) Found these holidays: 
  2023-01-01: New Year's Day
  2023-01-02: New Year's Day (observed)
  2023-02-20: Family Day
  2023-04-07: Good Friday
  2023-05-22: Victoria Day
  2023-07-01: Canada Day
  2023-08-07: British Columbia Day
  2023-09-04: Labour Day
  2023-09-30: National Day for Truth and Reconciliation
  2023-10-09: Thanksgiving Day
  2023-11-11: Remembrance Day
  2023-12-25: Christmas Day
  2024-01-01: New Year's Day
  2024-02-19: Family Day
  2024-03-29: Good Friday
  2024-05-20: Victoria Day
  2024-07-01: Canada Day
  2024-08-05: British Columbia Day
  2024-09-02: Labour Day
  2024-09-30: National Day for Truth and Reconciliation
  2024-10-14: Thanksgiving Day
  2024-11-11: Remembrance Day
  2024-12-25: Christmas Day
  2025-01-01: New Year's Day
  2025-02-17: Family Day
  2025-04-18: Good Friday
  2025-05-19: Victoria Day
  2025-07-01: Canada Day
  2025-08-04: British Columbia Day
  2025-09-01: Labour Day
  2025-09-30: National Day for Truth and Reconciliation
  2025-10-13: Thanksgiving Day
  2025-11-11: Remembrance Day
  2025-12-25: Christmas Day
2024-06-27 13:08:17.208 DEBUG (MainThread) [custom_components.holidays.calendar] (Complete) Looking for the next holiday
2024-06-27 13:08:17.208 DEBUG (MainThread) [custom_components.holidays.calendar] (Complete) next_date (2024-07-01), today (2024-06-27)
@latetedemelon latetedemelon added the bug Something isn't working label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants