Given the names used for the keyboard where it uses @output devicehandle MIDI "SAMSON Graphite 49" then
should be instead
Code:
midisend(devicehandle);
This should stop the error. But the script is sending the Midi output back to the keyboard which is probably not what you intend and that might create some kind of Midi loop (usually a bad thing). You need to be sending the midi via MIDI-Yoke to route this into Reaper. i.e.
Keyboard -> MIDI -> OSCII-bot -> MIDI -> MIDI-Yoke-> MIDI -> Reaper
Alternatively, to avoid passing on Midi you could open an OSC output to Reaper and instead use the Reaper OSC feature called VKB_MIDI_NOTE to send the note. This feature can be found in the Default.ReaperOSC OSC pattern config file. This post should help too
https://forum.cockos.com/showthread.php?t=155109