Solution
This error can appear if you're configuring a trigger for a channel that doesn't have a session initialized.
Ensure that any channel that you are configuring a trigger for has its session initalized.
If you're using multiple channels, you can create a single session with multiple channels or multiple sessions for the same instrument (as long as your device supports
this configuration).