Skip to content

blocking call (Home assistant) #612

Open
@stefanuytterhoeven

Description

@stefanuytterhoeven

I got this error:
Logger: homeassistant.util.loop
Source: util/loop.py:84
First appearance: 08:20:01 (1 gebeurtenissen)
Last logged: 08:20:01

Detected blocking call to open inside the event loop by custom integration 'pyscript' at custom_components/pyscript/trigger.py, line 626: time_sun = location.sunset(dt.date(year, month, day)) (offender: /usr/local/lib/python3.12/site-packages/pytz/init.py, line 108: return open(filename, 'rb')), please create a bug report at https://github.com/custom-components/pyscript/issues Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in 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 "/config/custom_components/pyscript/function.py", line 448, in run_coro result = await coro File "/config/custom_components/pyscript/trigger.py", line 1010, in trigger_watch time_next = TrigTime.timer_trigger_next(self.time_trigger, now, startup_time) File "/config/custom_components/pyscript/trigger.py", line 727, in timer_trigger_next this_t = cls.parse_date_time(match1[1].strip(), 0, now, startup_time) File "/config/custom_components/pyscript/trigger.py", line 626, in parse_date_time time_sun = location.sunset(dt.date(year, month, day))

Can you solve this. (HAOS 12.4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions