News:

--

Main Menu

Script error ...

Started by tropolite, January 09, 2024, 01:23:10 PM

Previous topic - Next topic

tropolite

Hi
My script was working fine one day but now it's not. I'm just a hack with code and this script has worked well enough for me, until now. The only thing that I've had between the script working and not is a Windows update. But I've had plenty of these before so don't really see this causing the problem.

I've attached the Script Error dialog, so I'm hoping anyone here may be able to assist figuring it out because I'd say everyone here would have a better comprehension of this error.

The script opens a select folder and all the mkv's in this folder will get converted with my specs and as .mp4.
Any assistance would be greatly appreciated.

You cannot view this attachment.

eumagga0x2a

Please post the script (and, obviously, ensure that you are using the latest available nightly build).

The assert is triggered when a script tries to access an audio track beyond the last loaded one (e.g. a file has two audio tracks which are then counted as 0 and 1, but the script tries to access track 2). Avidemux provides means to query the number of audio tracks, so you should be able to easily catch this safe crash in your script.

tropolite

Thanks eumagga0x2a

I knew if someone just looked at the message they would be able to decipher it better than me...
I'm just a 'hack n hope' Frankenstein coder  : )

Once you explained it to me, I knew where to look and as soon as I saw the problem I then remembered why I changed the '0' to '1' in part of the code. And silly me I didn't comment that in to the code to remind me of the change I made specifically for a batch that had multitrack audio. When I changed it back to '0' it all worked again.

Thanks again... ** Note to self.. comment any changes made to original scripts.