Jul-13-2021, 03:18 PM
Again, it started playing the MP3 requested but then got a run error. See below:
The Internet suggests leading the statement with try: and following up with except and pass.
What do you think?
The Internet suggests leading the statement with try: and following up with except and pass.
What do you think?
Output: $ sudo python3 SerialTest4.py
[170, 7, 2, 0, 4, 183]
[170, 1, 0, 171]
Traceback (most recent call last):
File "SerialTest4.py", line 41, in <module>
playing = read_status(ser)
File "SerialTest4.py", line 20, in read_status
raise ValueError('Serial sentinel error')
ValueError: Serial sentinel error