Skip to content

Orekit Python Wrapper - TransformTest fails

Following the Orekit Manual installation of the Python wrapper process to the end, all tests succeed when running python -m pytest, except for the TransformTest.py file, with the following stack trace:

`TransformTest.py .F [100%]

====================================================================FAILURES=====================================================================

______________________________________________________TransformTest.testPythonTransformType______________________________________________________

self = <TransformTest.TransformTest testMethod=testPythonTransformType>

def testPythonTransformType(self):
    # Create initial TimeStampedPVCoordinates
    pos = Vector3D(10000., 20000., 30000.)
    vel = Vector3D(2000., 1000., 1500.)
    date = datetime_to_absolutedate(datetime(2019, 4, 5))
    pvt1 = TimeStampedPVCoordinates(date, pos, vel)
    print(type(pvt1))

    # Create transform
    eme2000 = FramesFactory.getEME2000()
    icrf = FramesFactory.getICRF()
  transform = eme2000.getTransformTo(icrf, date)`

E orekit.JavaError: <super: <class 'JavaError'>, > E Java stacktrace: E org.orekit.errors.OrekitIllegalStateException: aucune entrée en cache E at org.orekit.utils.GenericTimeStampedCache.getLatest(GenericTimeStampedCache.java:253) E at org.orekit.bodies.JPLEphemeridesLoader$EphemerisRawPVProvider.getRawPV(JPLEphemeridesLoader.java:1055) E at org.orekit.bodies.JPLCelestialBody.getPVCoordinates(JPLCelestialBody.java:113) E at org.orekit.bodies.JPLCelestialBody$InertiallyOriented$1.getTransform(JPLCelestialBody.java:200) E at org.orekit.frames.Frame.getTransformTo(Frame.java:263)

TransformTest.py:84: JavaError

My environment:

  • Conda 4.5.12
  • Python 3.7
  • Orekit 10.1
  • Hipparchus 1.6
  • Rugged 2.1

Looking into the TransformTest.py file, the date used for the test is 05/04/2019 (date = datetime_to_absolutedate(datetime(2019, 4, 5))), but when looking into the resources.zip archive, into the resources/naif/DE431-ephemeris-NAIF.txt file, the available date range is around {january 2000..april 2000} (correlation between the failure and the missing data has been suggested by Bryan Cazabonne).

Solution: So, setting the TransformTest.py to the value in the DE431 ephemeris date range (13/03/2000 for instance, (datetime_to_absolutedate(datetime(2000, 3, 13)))) solved the issue and the two tests contained in the TransformTest.py file succeeded.

Olivier.