Skip to content

HA never restarts with pyscript activated #45

Closed
@VDRainer

Description

@VDRainer

I'm running HA 0.116.3 in a python3.8 venv on Ubuntu 18.04.
Installed pyscript via HASS and tried both options, UI Integration and pyscript in configuration.yaml.

First script runs very well and i like it.
BUT
I cannot restart HA anymore.
It looks like HA stops because there are no more new lines in home-assistant.log but my screen session where the hass process runs shows tons of tracebacks and i have to kill the process.

After removing from integration or in configuration.yaml, HA restart works normal.

...
Update for sensor.memory_use_percent fails
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
Update for sensor.swap_use_percent fails
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
Update for sensor.processor_use fails
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
Update for media_player.mpd fails
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
Update for media_player.mpd fails
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
Update for weather.dark_sky fails
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
Update for media_player.mpd fails
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
Update for switch.433_keller fails
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
Update for switch.lueften_keller fails
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
Update for switch.playstation4 fails
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
Update for switch.easyvdr_sound fails
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
Update for switch.beaglebone fails
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
Update for switch.e3dc fails
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
Update for switch.terra_nas fails
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
...

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