weiiiiird. seems like you’re using a Midi Fighter Twister (that’s the only time you’d get that deep in the ping_midi_devices bit of the code), which should just load.
it’s funny, that section of the code is essentially:
- is there a midi device connected?
- is that midi device named “Midi Fighter Twister”?
- no? cool, forget it, let’s move on. yes? awesome, let’s
use it. address it by its port number.
curious what happens after checking your SYSTEM > DEVICES > MIDI for dupes or weird names and a restart?
otherwise, any detail about the devices plugged in + repro steps would be 
edit:
ah, got it! I think that there’s a chance your SYSTEM > DEVICES > MIDI list was already full of devices, so when you plugged in the MFT it didn’t surface as a connected device, even though it is connected to the system.
dang. wild. this didn’t come up as a test case because i only have three MIDI devices lol.
tl;dr: as long as the MFT is listed in SYSTEM > DEVICES > MIDI, it won’t be a problem. i’ll also put a failsafe in the next update, so the script loads, but ultimately the MFT wouldn’t be usable if it’s not in the DEVICES > MIDI list…
not-script-level-thought: it might be dope to expand the DEVICES > MIDI list to report 8 ports…