-
Notifications
You must be signed in to change notification settings - Fork 54
Home Assistant crashed and stopped loading UI after installation Pyscript #703
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
Comments
Hey @mspnr 👋 What script were you running? |
Actually it was a couple of days ago. I started with the first script suggested in the tutorial https://hacs-pyscript.readthedocs.io/en/stable/tutorial.html and I think it was all right till the moment I started experiment and may insert some nonsense line, which probably ended up with compilation error. My point here is no matter what error happens in this script it should not put into risk the whole system stops to not boot up. |
As @IgnusG asked, the most important information you can provide is what script (code) you were running. It is possible to stall the main event loop by writing blocking code in pyscript. So it would be good to know whether that was the case, or whether something else happened. Being able to reproduce an error is the first step is debugging and fixing it. |
I am not sure if it helps. I copied the line from the original HA python script. So far this is the script: import os
@service
def hello_world(action=None, id=None):
"""hello_world example using pyscript."""
# log.info(f"hello world: got action {action} id {id}")
# if action == "turn_on" and id is not None:
# light.turn_on(entity_id=id, brightness=255)
# elif action == "fire" and id is not None:
# event.fire(id, param1=12, param2=80)
os.remove("/config/snapshots/_temp/1.jpg")
hass.services.call("camera", "snapshot", { "entity_id": "camera.cam1", "filename": "/config/snapshots/_temp/1.jpg" }) |
Same issue here... Troubleshooting from the hell |
Hi, same issue but after update to the last version of pyscript today. Core 2025.3.3 |
Please anyone can investigate? The only way to resolve is uninstall pyscript. |
I don't have access to that type of platform. Is there anything in the log files after you reboot? |
The first thing to try is to make sure it runs reliably with no scripts present in the pyscript directory. If it runs reliably without any scripts, then the problem is likely due to user code in the scripts. In that case, try adding scripts to figure out which one is the culprit. |
I tried to reinstall from zero che pyscript integration (no update, but uninstall delete the conf and re-install) and so it's works fine. Something went wrong with the update.... |
Home Assistant crashed and stopped loading UI after installation Pyscript.
Crash happened after activation of the integration and starting the first script.
Installation was performed from HACS, Pyscript version on moment of installation 1.6.1.
The situation was resolved by connecting display and keyboard to Raspberry Pi and surgically disabling integration. Then Home Assistant start load UI.
Be careful! I would consider such behavior as very dangerous.
Home Assistant versions:
Core 2025.2.5
Supervisor 2025.02.1
Operating System 14.2
Frontend 20250221.0
The text was updated successfully, but these errors were encountered: