Change code of boot.py

When I have changed the default LED code in boot.py file to other code then I am not able to run juypter notebook. It shows no connection. Why this is so? Any solution to this?
Thanks

What does the code do, and did you test it runs properly and exits?

Cathal

Yes, I tested it on Jupiter notebook. Code is about accessing a USB camera. I also tried simple code that is led on with buttons. It was working fine on the juypiter. But when I changed this code to boot.py, these codes are working fine but then Jupiter notebook is not working. It shows no connection.

Does your code exit and the boot.py script finishes, or are you running in an infinite loop?

Hi,

The boot.py is executed by a service in the system as well as jupyter.
If the service that executes boot.py fails or run forever, the jupyter service will not start. So, you will need to review the service log to fix the error.

sudo systemctl status bootpy.service

Mario

Thanks. I have exited the infinite loop using
videoIn.release()
hdmi_out.stop()
del hdmi_out
It works.
Thank you

1 Like