I seem not to be able to stop the recording after I started it. These are the steps on the way:
I get a warning when executing main.py:
uwestephan@Uwes-MacBook-Air Diane-main2 % python3 main.py
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
When I ignore the warning an start a recording by pressing the red button the following happens in the Terminal window:
_--- --- ---
Recording...
Converting to mp3
Exception in Tkinter callback
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tkinter/init.py", line 1948, in call
return self.func(*args)
^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/customtkinter/windows/widgets/ctk_button.py", line 553, in _clicked
self._command()
File "/Users/uwestephan/Python/Diane/Diane-main2/main.py", line 253, in
command=lambda: record(self, icon_rec, icon_stop_rec), text="Spela in")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/uwestephan/Python/Diane/Diane-main2/main.py", line 108, in record
convert_to_mp3(filename, mp3_filename)
File "/Users/uwestephan/Python/Diane/Diane-main2/main.py", line 55, in convert_to_mp3
audio.export(output_file, format="mp3")
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pydub/audio_segment.py", line 963, in export
p = subprocess.Popen(conversion_command, stdin=devnull, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1024, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1901, in _execute_child
raise child_exception_type(errno_num, err_msg, errfilename)
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
When I now press the red "Stoppa inspelningen" button, nothing happens. I have to kill it manually.
Hi Micke
I seem not to be able to stop the recording after I started it. These are the steps on the way:
uwestephan@Uwes-MacBook-Air Diane-main2 % python3 main.py /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
_--- --- ---
Recording... Converting to mp3 Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tkinter/init.py", line 1948, in call return self.func(*args) ^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/customtkinter/windows/widgets/ctk_button.py", line 553, in _clicked self._command() File "/Users/uwestephan/Python/Diane/Diane-main2/main.py", line 253, in
command=lambda: record(self, icon_rec, icon_stop_rec), text="Spela in")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/uwestephan/Python/Diane/Diane-main2/main.py", line 108, in record
convert_to_mp3(filename, mp3_filename)
File "/Users/uwestephan/Python/Diane/Diane-main2/main.py", line 55, in convert_to_mp3
audio.export(output_file, format="mp3")
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pydub/audio_segment.py", line 963, in export
p = subprocess.Popen(conversion_command, stdin=devnull, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1024, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1901, in _execute_child
raise child_exception_type(errno_num, err_msg, errfilename)
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
Anny ideas what might have happened?
Best regards Uwe