Kosinkadink / ComfyUI-VideoHelperSuite

Nodes related to video workflows
GNU General Public License v3.0
513 stars 90 forks source link

cannot access local variable 'res' where it is not associated with a value #250

Open blueroutecn opened 1 month ago

blueroutecn commented 1 month ago

ComfyUI-VideoHelperSuite\videohelpersuite\utils.py", line 172, in get_audio match = re.search(', (\d+) Hz, (\w+), ',res.stderr.decode('utf-8')) ^^^ UnboundLocalError: cannot access local variable 'res' where it is not associated with a value

How to fix it.

AustinMroz commented 1 month ago

There's an error being thrown by ffmpeg when it tries to decode audio, which the current code was handling improperly.

I've pushed an update to properly expose what that error is, but you'll likely need to share what that new error message is.