Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4989

Python • Re: Help Request: Loading Python Script at Boot / Script Behaves Erratically

$
0
0
You seem to be asking multiple questions:
  • If the program works fine from a terminal prompt, and not just in SYSTEMD or CRON then post your configuration for SYSTEMD or CRON and ask what's wrong with your startup definition.
  • If your program does not work from a terminal prompt, then post the error message(s) you are getting.
Some additional thoughts:
  • How do you know that the PUBLISH is not working? When I debug MQTT apps I run a dummy Python program SUBSCRIBING to the queue to see that the PUB working.
  • I'm not familiar with using OS.SYSTEM. I use OS.SUBPROCESS https://docs.python.org/3/library/subpr ... subprocess which I think is the preferred method. Does OS.SYSTEM wait for the command to finish before returning to Python? If it doesn't, then you are spawning a new MPG123 subprocess with each call before the previous has finished.

Statistics: Posted by DS256 — Tue Jul 23, 2024 7:10 pm



Viewing all articles
Browse latest Browse all 4989

Trending Articles