RuntimeError: Call to Query::Send() returned null

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "f:\xms\devproj\trunk\dev\sms\app\bin64\Python36\lib\site-packages\xmscomponents\Component_Runner.py", line 98, in main
    messages, action_requests = method_to_invoke(query, params, win_cont, icon)
  File "f:\xms\git\srh2d\xmssrh\components\sim_component.py", line 252, in statistics
    run_statistics_with_feedback(query, win_cont, icon)
  File "f:\xms\git\srh2d\xmssrh\components\statistician_runner.py", line 68, in run_statistics_with_feedback
    worker.statistician.send()  # Send data back to XMS
  File "f:\xms\git\srh2d\xmssrh\model\statistician.py", line 189, in send
    self._query.send()
SystemError: <Boost.Python.function object at 0x000002131B207040> returned a result with an error set
