I'm new here and ran into an issue earlier today that I could resolve while preparing a minimal example.
(Basically: if you use selex.defineSample(), use different names for the samples described in this way and the handles defined with selex.sample() to make sure you know which is which! RStudio helped me find this mistake, as it lists objects in a special window so you immediately see if one of them is NULL. In Jupyter notebook, displaying does the same but is not automatic).
Also, shout out to the team maintaining the SELEX package, who immediately offered their help. Thanks a lot!