I think it's better to use cron to run main.py instead of doing so in /etc/profile. It looks like every time you log in more than once, it tries to run main.py and errors show up.
$sudo crontab -u root -e
@reboot python3 /home/pi/pi-camera-stream-flask/main.py
I think it's better to use cron to run main.py instead of doing so in /etc/profile. It looks like every time you log in more than once, it tries to run main.py and errors show up. $sudo crontab -u root -e @reboot python3 /home/pi/pi-camera-stream-flask/main.py