[Bug] Process Exit With Exception
We2Am-BaSsem opened this issue · comments
We'am Bassem commented
Steps to reproduce
- Open the project directory
- Open a terminal in the project directory
- Run command
python3 quran_cli.py -rd 0
in terminal - Wait until the radio works
- press
CTRL + C
to kill the process
Expected behaviour (correct)
The process should be safely(exited without exception)
Current behaviour (bug)
Exit with Exception
Environment
ubuntu 22.04
Relevant logs and/or media (optional)
Write here or upload an image/video
Radio Name: ---Amazing short Recitations---
(+) Audio --aid=1 (mp3 2ch 44100Hz)
AO: [pulse] 44100Hz stereo 2ch float
A: 00:00:01 / 00:00:13 (8%) Cache: 11s/408KB
File tags:
icy-title: 339-محمد حكمي - نرفع درجات من نشاء
A: 00:00:03 / 00:00:19 (20%) Cache: 15s/552KB
Exiting... (Quit)
Traceback (most recent call last):
File "/home/we2am/Desktop/Github/Quran-cli/quran_cli.py", line 24, in <module>
radioMode(radioIndex)
File "/home/we2am/Desktop/Github/Quran-cli/modes/radioMode.py", line 86, in radioMode
runRadio(radioIndex)
File "/home/we2am/Desktop/Github/Quran-cli/modes/radioMode.py", line 70, in runRadio
runFromURL(getRadioURL(radioIndex))
File "/home/we2am/Desktop/Github/Quran-cli/utilities/helperFunctions.py", line 38, in runFromURL
subprocess.call(["mpv", url])
File "/usr/lib/python3.10/subprocess.py", line 347, in call
return p.wait(timeout=timeout)
File "/usr/lib/python3.10/subprocess.py", line 1204, in wait
return self._wait(timeout=timeout)
File "/usr/lib/python3.10/subprocess.py", line 1938, in _wait
(pid, sts) = self._try_wait(0)
File "/usr/lib/python3.10/subprocess.py", line 1896, in _try_wait
(pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt
Root Cause Analysis
the audio player was displayed and closing the process was causing exceptions due to closing the player
Other Comments
solved in issue commit: remove audio diplay
Ahmed Ihab commented
It's fixed now @We2Am-BaSsem <3
Thanks a lot ^_^