PythonEventHandler problem after updating Orekit to 11.1 (from 10.x)

Hi Orekit users,

Could anyone please help me to address a problem in using PythonEventHandler?

I’m testing one example, python_files/test/, in the following link:

I replaced the package as follows:

in the example:
from org.orekit.python import PythonEventHandler

from import PythonEventHandler

However, this example failed to run. Here’s an error message.

testBackAndForth (main.BackAndForthDetectorTest) … ERROR

ERROR: testBackAndForth (main.BackAndForthDetectorTest)

Traceback (most recent call last):
File “”, line 105, in testBackAndForth
orekit.JavaError: <super: <class ‘JavaError’>, >
Java stacktrace:
java.lang.RuntimeException: AttributeError
at Method)
at org.orekit.propagation.analytical.AbstractAnalyticalPropagator.propagate(
at org.orekit.propagation.AbstractPropagator.propagate(

Ran 1 test in 9.161s

FAILED (errors=1)

This example had no problem when I ran it in Orekit 10.x.

Is there something I missed? Or should I rewrite this event handler for Orekit 11.1?

Look forward to getting your feedback.

Thank you for your help in advance!


Hi @ipark

I’m not a Python expert but the only thing I know is that the signature of the init(…) method of Orekit’s EventHandler interface has been modified between 10.X and 11.X.
The signature has changed from init(state0, targetEpoch) to init(state0, targetEpoch, detector).

I see two possibilities:

  • Probably this test is just obsolete
  • Or the PythonEventHandler was not updated

Best regards,