This piece of code works fine when run on the Spyder IDE, but crashes when I convert it to exe with auto-py-to-exe. I know it might be because I didn't explicetly include ffmpeg in my pytoexe config and so another user of my program that doesn't have ffmpeg installed might run intro problems, but it doesn't even work for me. When I comment out the try/except block, tt crashes and my way of debugging it has been with Windows events viewer, which doesn't give much details except this code 0xC0000409 (which I got some other time because I accessed indexes on an array that were not there) so I made the script print into a file, giving this error: 'NoneType' object has no attribute 'write'
try:
ffmpeg_extract_subclip(required_video_file, clipStart , clipEnd)
except Exception as e:
with open('DEBUGGING.txt', 'a+') as f:
f.writelines('\n EXCEPCION:\n'+str(e))
f.close()
Doesn't make sense because ffmpeg_extract_subclip doesn't even have a write method, and the error is only caused by this lines, cause all the other ones are printed fine into my txt file. As I said, the clips are made successfully when I do it through my IDE, but stops working for some reason when I run the exe.
Edit: placing ffmpeg and ffprobe in the folder didn't solve it. Python version: 3.11